This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol
- From: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>
- To: Renlin Li <renlin dot li at foss dot arm dot com>
- Cc: Jiong Wang <wong dot kwongyuan dot tools at gmail dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>, Nicholas Clifton <nickc at redhat dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Wed, 4 Oct 2017 10:07:52 +0100
- Subject: Re: [ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol
- Authentication-results: sourceware.org; auth=none
- References: <59C26C78.6060001@foss.arm.com> <CAAfDdZ2zoce2=C1tKuN0f62T3xHvZUTaHzxnqcDa6ogjS_cxjQ@mail.gmail.com> <59C40506.9090102@foss.arm.com>
On Thu, Sep 21, 2017 at 7:29 PM, Renlin Li <renlin.li@foss.arm.com> wrote:
> Hi Jiong,
>
> I missed the conversation about this.
>
> I double checked the conditions to call elf_backend_finish_dynamic_symbol
> function.
> Indeed, The expected case the code want to caught is won't trigger the
> backend function at all.
>
> I run the glibc test with the new linker.
> I use the a native gcc armhf tool-chain together with its libstdc++.so and
> libc.so to compile the test case.
>
> There is no BFD internal errors mentioned
> here: https://sourceware.org/ml/binutils/2017-06/msg00412.html
>
>
> But I agree that, the check is redundant. And I removed the check in the
> patch.
>
> Additionally, there are other GOT related relocates that are not included
> when generating the R_ARM_RELATIVE relocations for local symbols in GOT.
> They are:
> R_ARM_GOTPC
> R_ARM_GOTOFF32
>
> But it seems the related symbols are not put into the GOT table. So that
> should be fine.
>
> The relocations:
> R_ARM_GOT32
> R_ARM_GOT_PREL
> are properly handled to create R_ARM_RELATIVE relocations for this case.
Ok.
Ramana
>
>
> Regards,
> Renlin
>
>
>
> bfd/ChangeLog:
>
> 2017-09-21 Renlin Li <renlin.li@arm.com>
>
> PR ld/21402
> (allocate_dynrelocs_for_symbol): Only make undefined weak symbols into
> dynamic.
>
> ld/ChangeLog:
>
> 2017-09-21 Renlin Li <renlin.li@arm.com>
>
> PR ld/21402
> * testsuite/ld-arm/tls-app.d: Update address.
> * testsuite/ld-arm/tls-app.r: Remove relocations.
> * testsuite/ld-arm/unresolved-1-dyn.d: Update.
>
> On 20/09/17 15:29, Jiong Wang wrote:
>>>
>>> (elf32_arm_finish_dynamic_symbol): Add sanity check.
>>
>>
>> Have you verified ARM port is immune from
>> https://sourceware.org/ml/binutils/2017-06/msg00412.html ?
>>
>> The sanity check proven to be unnecessary and it does not contribute
>> to the correctness. The explanation is at:
>> https://sourceware.org/ml/binutils/2017-07/msg00018.html
>>
>> Regards,
>> Jiong
>>
>