[uClibc-cvs] uClibc/libc/sysdeps/linux/i386 crt0.S,1.16,1.17
Erik Andersen
andersen at codepoet.org
Thu Jan 23 13:19:02 UTC 2003
Update of /var/cvs/uClibc/libc/sysdeps/linux/i386
In directory winder:/tmp/cvs-serv3593
Modified Files:
crt0.S
Log Message:
simpler method for getting a 'main' reference. Make _init and _fini
be weak so people won't need to fix their compilers
Index: crt0.S
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/i386/crt0.S,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- crt0.S 12 Dec 2002 10:14:17 -0000 1.16
+++ crt0.S 23 Jan 2003 13:18:58 -0000 1.17
@@ -37,6 +37,17 @@
.globl _start
.type _start, at function
+#if defined L_crt0 || ! defined __UCLIBC_CTOR_DTOR__
+ .type __uClibc_main,%function
+#else
+ .weak _init
+ .weak _fini
+ .type __uClibc_start_main,%function
+#endif
+/* Stick in a dummy reference to main(), so that if an application
+ * is linking when the main() function is in a static library (.a)
+ * we can be sure that main() actually gets linked in */
+ .type main,%function
_start:
/* locate the start of the environment variables */
@@ -86,10 +97,5 @@
/* Crash if somehow `exit' returns anyways. */
hlt
-
-/* Stick in a dummy reference to main(), so that if an application
- * is linking when the main() function is in a static library (.a)
- * we can be sure that main() actually gets linked in */
-L_dummy_main_reference:
- .long main
+.size _start,.-_start
More information about the uClibc-cvs
mailing list