[patch] init_array/fini_array support
Joseph S. Myers
joseph at codesourcery.com
Wed Feb 15 17:25:38 UTC 2006
On Tue, 14 Feb 2006, Peter S. Mazinger wrote:
> > I don't see the problem. The init_array and fini_array are available both
> > via the magic linker symbols and via the ELF DT_INIT_ARRAY and
> > DT_FINI_ARRAY. In a static binary, the first mechanism is used. In a
> > dynamic binary, __uClibc_main is in libc.so which is linked against ld.so
> > and gets the _dl_app_*_array functions from there.
>
> That won't work like this w/ uclibc's ld.so, we have to enforce compiling
I know it *does* work because my patch is tested with the GCC testsuite on
ARM EABI (on which static constructors/destructors use
init_array/fini_array so many tests fail without support for them working
properly).
> anything against libc.so and ld.so, else _dl_app_*_array will be undefined
> each app will need DT_NEEDED for ld.so.
--
Joseph S. Myers
joseph at codesourcery.com
More information about the uClibc
mailing list