[RFC] Default ld -r should not combine .init_array sections
Jie Zhang
jie@codesourcery.com
Fri Feb 26 17:22:00 GMT 2010
On 02/26/2010 09:24 PM, H.J. Lu wrote:
> On Fri, Feb 26, 2010 at 12:30 AM, Jie Zhang<jie@codesourcery.com> wrote:
>> On 02/26/2010 12:30 AM, H.J. Lu wrote:
>>>
>>> On Thu, Feb 25, 2010 at 8:05 AM, Jie Zhang<jie@codesourcery.com> wrote:
>>>>
>>>> We found this issue on arm-none-eabi target. The default ld -r combines
>>>> .init_array.* sections. Such that priority information recorded in
>>>> section
>>>> name will be lost. When the object file from the output of "ld -r" is
>>>> linked
>>>> into the final executable, the static constructors will do initialization
>>>> in
>>>> wrong order.
>>>>
> I think you can use assembly input and .d file for testcase. There
> is no need for a complete new cdtest2.exp.
>
Good idea. How about this new version? I also rebased it on Alan's change.
Another question is: If this change is good, should I also change other
.sc files which have .init_array and .fini_array?
Regards,
Jie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fsf-ld-init-array-with-r-3.diff
Type: text/x-patch
Size: 3324 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100226/ae07a666/attachment.bin>
More information about the Binutils
mailing list