_init magic for c++ (on sparc64)
Ralf Corsepius
ralf.corsepius at rtems.org
Tue Nov 30 11:15:03 UTC 2010
On 11/30/2010 10:39 AM, Sebastian Huber wrote:
> On 11/30/2010 10:28 AM, Ralf Corsepius wrote:
>> On 11/30/2010 09:21 AM, Sebastian Huber wrote:
>>> Hi,
>>>
>>> sorry, my commit
>>>
>>> 2010-11-29 Sebastian Huber<sebastian.huber at embedded-brains.de>
>>>
>>> * libcsupport/src/newlibc_exit.c, score/src/threadhandler.c: Added
>>> support for .preinit_array, .init_array and .fini_array sections.
>>>
>>> was broken. It seems that HAVE_INITFINI_ARRAY is defined for nearly all
>>> targets by Newlib,
>>
>> The INIT_FINI magic is provided by GCC. newlib is supposed to pick it up
>> from GCC.
>>
>>> but only few linker command files respect this.
>> Well, though init/fini initialization repeatedly had been subject to
>> issues in RTEMS history, I am having doubts on this claim.
>
> sh at cosinus:~/rtems-cvs> grep -r '\.init_array' -l .
> ./c/src/lib/libbsp/nios2/nios2_iss/startup/linkcmds
> ./c/src/lib/libbsp/arm/nds/startup/linkcmds
> ./c/src/lib/libbsp/arm/nds/coproc/coproc.ld
> ./c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.base
> ./c/src/lib/libbsp/powerpc/mpc55xxevb/startup/linkcmds.base
> ./c/src/lib/libbsp/powerpc/shared/startup/linkcmds
> ./c/src/lib/libbsp/powerpc/gen5200/startup/linkcmds.base
> ./c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.base
> ./c/src/lib/libbsp/lm32/lm32_evr/startup/linkcmds
> ./c/src/lib/libbsp/lm32/milkymist/startup/linkcmds
> ./c/src/lib/libbsp/i386/pc386/startup/linkcmds
> ./c/src/lib/libbsp/m32c/m32cbsp/startup/linkcmds
> ./c/src/lib/libbsp/m32r/m32rsim/startup/linkcmds
> ./tools/cpu/nios2/sample.ptf
All this list tells, it that those BSPs you have implemented apply init
sections in their linkcmds. Any further conclusion, is invalid at this
point in time.
> Also RTEMS does not care about the functions referenced by the array sections.
Correct, GCC does the ground work.
Ralf
More information about the users
mailing list