This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol


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
>>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]