[PATCH][AARCH64] Fix TLS relocation resolution
Richard Earnshaw
rearnsha@arm.com
Tue Oct 16 16:02:00 GMT 2012
On 16/10/12 16:46, Marcus Shawcroft wrote:
> On 16/10/12 16:14, Sofiane Naci wrote:
>> Hi,
>>
>> This patch fixes a bug in the resolution of AArch64 TLS relocations
>> AARCH64_TLSLE_*_TPREL_*.
>> It also fixes wrong shift values for some of the AArch64 TLS relocations in
>> the howto tables.
>
> The change to shift values and signed_addend look correct to me. The
> test added covers R_AARCH64_TLSLE_ADD_TPREL_HI12 and
> R_AARCH64_TLSLE_ADD_TPREL_LO12 but is missing coverage of the other
> relocations modified by the patch.
>
> This addresses a rather nasty issue in the toolchain, have we missed 2.23 ?
>
This is OK for trunk and, if/when Tristan agrees for the 2.23 branch.
Please could you prepare some tests for the other relocs.
Thanks.
R.
> Cheers
> /Marcus
>
>>
>> Thanks
>> Sofiane
>>
>> -----
>>
>> ChangeLog:
>>
>> bfd/
>>
>> * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value
>> for
>> R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
>> R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
>> R_AARCH64_TLSLE_ADD_TPREL_HI12.
>> (elf64_aarch64_tlsdesc_howto_table): Fix shift value for
>> R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
>> (elf64_aarch64_final_link_relocate): Add signed_addend when
>> resolving
>> AARCH64_TLSLE_*_TPREL_* relocations.
>>
>> ld/testsuite/
>>
>> * ld-aarch64/tlsle-symbol-offset.s: New file.
>> * ld-aarch64/tlsle-symbol-offset.d: New file.
>> * ld-aarch64/aarch64-elf.exp: Add tlsle-symbol-offset test.
>
>
>
More information about the Binutils
mailing list