summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-03-20 23:37:24 +0000
committerJoakim Tjernlund <joakim.tjernlund@transmode.se>2005-03-20 23:37:24 +0000
commit748c2fe4247540c1ffa333705d7384f6da41da4f (patch)
treec437fc697ed867b5cf199702a751b939124a7b87 /libc/sysdeps/linux
parentf49539f93873f67d0efcacf49576590ab9c8d971 (diff)
Pass _dl_fini function ptr to __uClibc_start_main().
To actually use it, one must define _DL_DO_FINI_IN_LIBC globally. That will also break ABI for apps linked with previous version of crtX.S. They must be relinked with this version to work again.
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/i386/crt0.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/i386/crt0.S b/libc/sysdeps/linux/i386/crt0.S
index 98baa257b..735d5167f 100644
--- a/libc/sysdeps/linux/i386/crt0.S
+++ b/libc/sysdeps/linux/i386/crt0.S
@@ -55,6 +55,7 @@ _start:
popl %ecx /* Store argc into %ecx */
movl %esp,%ebx /* Store argv into ebx */
movl %esp,%eax /* Store argv into eax as well*/
+ movl %edx,%esi /* Store edx(FINI ptr) in %esi */
movl %ecx,%edx /* Stick argc into %edx so we can do some math in a sec */
leal 4(%eax,%edx,4),%eax
@@ -81,7 +82,7 @@ _start:
pop %edx
addl $_GLOBAL_OFFSET_TABLE_+[.-.L0],%edx
#endif
-
+ pushl %esi /* Push FINI pointer */
#if (defined L_crt1 || defined L_Scrt1) && defined __UCLIBC_CTOR_DTOR__
/* Push .init and .fini arguments to __uClibc_start_main() on the stack */
#ifdef L_Scrt1