[PATCH + test RFA] MIPS/LD: Fix crashing with a discarded dynamic relocation section

H.J. Lu hjl.tools@gmail.com
Fri Jul 20 17:12:00 GMT 2018


On Fri, Jul 20, 2018 at 9:41 AM, Maciej W. Rozycki <macro@mips.com> wrote:
> On Fri, 20 Jul 2018, H.J. Lu wrote:
>
>> >> 'RELA' relocation section at offset 0x70 contains 24 bytes:
>> >>   Offset          Info           Type           Sym. Value    Sym. Name + Addend
>> >> 000000000088  000100000001 R_X86_64_64       0000000000000000 foo + 0
>> >> [hjl@gnu-cfl-1 ld]$
>> >
>> >  Is that legitimate or just rubbish as with most targets?  Given that
>>
>> On x86_64, .rela.dyn is combined from different .rela sections by
>> -z combreloc.
>
>  Ack, good to know.
>
>> > `.rela.dyn' has been discarded where does this relocation come from (if
>> > more relocation sections need to be discarded with x86-64, then let's just
>> > add them to the /DISCARD/ assignment; perhaps I should have used `.rel*'
>> > as the pattern instead).
>> >
>>
>> I prefer .rel.* and .rela.*
>
>  Fine with me.
>
>  Can you please handle this for me?  I'm heading off tonight for several
> weeks and won't have the time to go through the usual regression testing
> of any updates.
>
>  Sorry for the mess-up, but as I noted in the original submission I
> believe there is value in such wide testing across targets rather than
> limiting the test to MIPS targets only, where the original crash happened
> that prompted me to go ahead with this change.
>

This is what I checked in.  I leave powerpc failure to Alan.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ld-Discard-.rel.-and-.rela.-sections.patch
Type: text/x-patch
Size: 1613 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180720/9501ed9d/attachment.bin>


More information about the Binutils mailing list