Ping! malloc bug, and PIC and flat shared library support for m68k

Richard Sandiford richard at codesourcery.com
Fri Nov 17 18:27:00 UTC 2006


Mike Frysinger <vapier at gentoo.org> writes:
>> >> +/* If __HAVE_SHARED_FLAT__, all array initialisation and finalisation
>> >> +   is handled by the routines passed to __uClibc_main().  */
>> >
>> > without really looking into the issue myself (i try to stick with ELF
>> > where possible), i guess there is no sane way of having shared flat just
>> > use existing init/fini arrays
>>
>> Yeah, I think it would need some sort of extension to the file format.
>> There's no equivalent of DT_INIT* and DT_FINI* tags here.
>
> well, the DT tags only matter when the ldso is involved i thought ... 
> otherwise those init/fini array symbols are provided implicitly by the 
> linker ...

It sounds like I might have misunderstood your question.  I thought you
were asking whether there was any way the kernel could handle init/fini
arrays itself, rather than leaving it to the crt code.  (And it would
have to be the kernel because, as you say, there's no separate loader
involved here.)

Are you asking instead whether normal .init_array and .fini_array
sections are handled by the patch as-is?  If so, the answer's yes.
It handles both .init/.fini sections and .init_array/.fini_array
sections, much as __uClibc_main.c already does for "static"
uClinux executables.

Richard



More information about the uClibc mailing list