[uClinux-dev] [PATCH] Remove duplicate defines from elf2flt.ld

Harry Gunnarsson mrharryg at gmail.com
Thu Aug 30 11:46:13 EDT 2007


Oh, you are using GCC4.3 for your work. I assume you hand-crafted it
yourself.
If you have time, could you provide some information as how you built it?
Did you use the build script provided in the source 4.1.1 distribution?
Which binutils, uClibc did you use? etc.
BTW, which CPU do you use?

Thanks in advance,
Harry


On 8/30/07, Jie Zhang <jzhang918 at gmail.com> wrote:
>
> The constructors of application are placed in an array __CTOR_LIST__[].
> __CTOR_LIST__[0] is the number of the destructors or -1 which means the
> number of the destructors are not specified. __CTOR_END__ marks the end
> of the array. __CTOR_END__[0] is 0. crtstuff.c sets __CTOR_LIST__[0] to
> -1 and __CTOR_END__[0] to 0. But elf2flt.ld.in did the same thing again,
> except that the symbols it provides are global. You could see two set of
> defined __CTOR_LIST__/__CTOR_END__ in the resulted application.
>
> num of ctors, -1,           constructors, 0,           0
> ^             ^                           ^            ^
> __CTOR_LIST__ __CTOR_LIST__               __CTOR_END__ __CTOR_END__
>
> The outer pair are generated by elf2flt.ld.in. The inner pair are
> provided by crtstuff.c. Same is destructor array.
>
> I discovered this when I was testing gcc-4.3, which is different with
> gcc-4.1 in execution of destructors.
>
>
> Please review and commit it if it's OK.
>
>
> Jie
>
> _______________________________________________
> uClinux-dev mailing list
> uClinux-dev at uclinux.org
> http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
> This message was resent by uclinux-dev at uclinux.org
> To unsubscribe see:
> http://mailman.uclinux.org/mailman/options/uclinux-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.uclinux.org/pipermail/uclinux-dev/attachments/20070830/b7df3c77/attachment.html


More information about the uClinux-dev mailing list