[PATCH][gold] Fix offset calculation when applying AArch64 TLSDESC relocations.
Jing Yu via binutils
binutils@sourceware.org
Fri Aug 25 16:34:00 GMT 2017
Thanks for the patch. It looks good to me.
BTW, the attachment has .txt suffix. Can you resend the patch?
Thanks,
Jing
On Fri, Aug 25, 2017 at 7:10 AM, Igor Kudrin <ikudrin@accesssoftek.com> wrote:
> Hi,
>
> If a custom linker script with an unexpected relative layout of .got
> and .got.plt sections was used, gold might produce a wrong offset
> when applying R_AARCH64_TLSDESC_* relocations.
>
> This patch fixes the issue by calculating "got_tlsdesc_offset"
> in a more direct way.
>
> Best regards,
> Igor Kudrin
> C++ Developer, Access Softek, Inc.
>
> ---
> gold/ChangeLog
>
> * aarch64.cc (Target_aarch64::Relocate::relocate_tls):
> Make got_tlsdesc_offset signed and fix its calculation.
> * testsuite/Makefile.am (aarch64_tlsdesc): New test.
> * testsuite/Makefile.in: Regenerate.
> * testsuite/aarch64_tlsdesc.s: New test source file.
> * testsuite/aarch64_tlsdesc.sh: New test script.
> * testsuite/aarch64_tlsdesc.t: New test linker script.
More information about the Binutils
mailing list