[ARM] PR ld/21402, only override the symbol dynamic decision on undefined weak symbol
Renlin Li
renlin.li@foss.arm.com
Thu Sep 21 18:29:00 GMT 2017
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.
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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm.diff
Type: text/x-patch
Size: 3458 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170921/f7c8bfa1/attachment.bin>
More information about the Binutils
mailing list