This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][gold] Fix offset calculation when applying AArch64 TLSDESC relocations.
- From: Igor Kudrin <ikudrin at accesssoftek dot com>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, Jing Yu <jingyu at google dot com>, Han Shen <shenhan at google dot com>
- Date: Mon, 28 Aug 2017 09:33:32 +0000
- Subject: Re: [PATCH][gold] Fix offset calculation when applying AArch64 TLSDESC relocations.
- Authentication-results: sourceware.org; auth=none
- References: <1503670226606.94145@accesssoftek.com>,<CAJimCsGm7U6qDgzk5RL+b7LxryicjWPQpo3jX+aLMXkTSGNiWQ@mail.gmail.com>
Thank you! Could you apply it then?
Best Regards,
Igor Kudrin
C++ Developer, Access Softek, Inc.
________________________________________
From: Cary Coutant <ccoutant@gmail.com>
Sent: Monday, August 28, 2017 12:07 PM
To: Igor Kudrin
Cc: binutils@sourceware.org; Jing Yu; Han Shen
Subject: Re: [PATCH][gold] Fix offset calculation when applying AArch64 TLSDESC relocations.
> 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.
This is OK. Thanks!
-cary