dl_app_init

Kevin Day thekevinday at gmail.com
Thu Jan 4 05:07:20 UTC 2007


I came back to the issue I mentioned in the past and tried to do a
correct fix as opposed to that hack.

It looks like the best way to prevent it from including this would be
to make the two functions weak.
Nothing breaks, toolchain creates itself properly, target system
cleanly buils from toolchain.

Patch below:

--- uClibc-20061126/libc/misc/internals/__uClibc_main.c.orig	2007-01-03
09:53:20 -0600
+++ uClibc-20061126/libc/misc/internals/__uClibc_main.c	2007-01-03
14:37:32 -0600
@@ -89,8 +89,8 @@
 #endif

 #ifdef __UCLIBC_CTOR_DTOR__
-extern void _dl_app_init_array(void);
-extern void _dl_app_fini_array(void);
+extern void weak_function _dl_app_init_array(void) attribute_hidden;
+extern void weak_function _dl_app_fini_array(void) attribute_hidden;
 # ifndef SHARED
 /* These magic symbols are provided by the linker.  */
 extern void (*__preinit_array_start []) (void) attribute_hidden;



More information about the uClibc mailing list