[patch] init_array/fini_array support

Peter S. Mazinger ps.m at gmx.net
Thu Jan 19 13:54:15 UTC 2006


On Thu, 19 Jan 2006, Joseph S. Myers wrote:

> This patch adds support for ELF preinit_array, init_array and fini_array.  
> The general approach is similar to that used by glibc, in particular 
> __uClibc_main now gets passed __libc_csu_init and __libc_csu_fini instead 
> of _init and _fini, and these wrapper functions take care of calling the 
> init/fini array functions and _init/_fini in the right order.
> 
> This is the first of two patches adding support for the ARM EABI (which 
> specifies that init_array and fini_array are used for static constructors 
> / destructors, so C++ isn't that useful with the EABI without init_array / 
> fini_array support) and has been tested together with the patch adding the 
> EABI port.  However, init_array/fini_array support is also meaningful for 
> any target (and conversely, the EABI port would work C-only without this 
> patch).

Does it break compatibility w/ old compiled apps? If yes we should try to 
allow an update path from .28 even if all the apps have to be recompiled.
The compat stuff is generally removed after the next release.

[...]

> @@ -19,7 +19,8 @@
>  libc-a-y+=$(MISC_INTERNALS_OBJ)
>  libc-so-y+=$(MISC_INTERNALS_OBJ:.o=.os)
>  libc-shared-y+=$(MISC_INTERNALS_OUT)/__uClibc_main.oS
> -libc-static-y+=$(MISC_INTERNALS_OUT)/__uClibc_main.o
> +libc-static-y+=$(MISC_INTERNALS_OUT)/__uClibc_main.o $(MISC_INTERNALS_OUT)/elf-init.o
> +libc-nonshared-y+=$(MISC_INTERNALS_OUT)/elf-init-nonshared.o

we want in libc-nonshared-y files built w/ -fPIC, so elf-init-nonshared.os 
here please

thanks, Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc mailing list