[uClibc-cvs] svn commit: trunk/uClibc/libc/sysdeps/linux/i386

jocke at uclibc.org jocke at uclibc.org
Sun Mar 20 23:37:25 UTC 2005


Author: jocke
Date: 2005-03-20 16:37:24 -0700 (Sun, 20 Mar 2005)
New Revision: 10047

Log:
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.


Modified:
   trunk/uClibc/libc/sysdeps/linux/i386/crt0.S


Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/i386/crt0.S
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/i386/crt0.S	2005-03-20 23:18:28 UTC (rev 10046)
+++ trunk/uClibc/libc/sysdeps/linux/i386/crt0.S	2005-03-20 23:37:24 UTC (rev 10047)
@@ -55,6 +55,7 @@
 	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 @@
 	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




More information about the uClibc-cvs mailing list