[2/2][LD][AARCH64]Add BFD_RELOC_AARCH64_TLSLE_LDST8/16/32/64_TPREL_LO12 support in LD.

Renlin Li renlin.li@foss.arm.com
Wed Mar 28 14:55:00 GMT 2018


Hi all,

This is the second patch to add the following relocation support into binutils.
BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.

Those relocations includes both ip64 and ilp32 variant.

In this patch, the relocations support in ld is added.


Regard,
Renlin


bfd/ChangeLog:

2018-03-23  Renlin Li  <renlin.li@arm.com>

         PR ld/22970
	* elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Add cases for
	BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
	BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
	BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
	BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
	BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
	BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
	BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
	BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
	(elfNN_aarch64_final_link_relocate): Support new relocations.
	* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Support new
	relocations.
	(_bfd_aarch64_elf_resolve_relocation): Support new relocations.

ld/ChangeLog:

2018-03-23  Renlin Li  <renlin.li@arm.com>

         PR ld/22970
	* testsuite/ld-aarch64/aarch64-elf.exp: Update to run new tests.
	* testsuite/ld-aarch64/emit-relocs-552-overflow.d: New.
	* testsuite/ld-aarch64/emit-relocs-552-overflow.s: New.
	* testsuite/ld-aarch64/emit-relocs-552.d: New.
	* testsuite/ld-aarch64/emit-relocs-552.s: New.
	* testsuite/ld-aarch64/emit-relocs-553.d: New.
	* testsuite/ld-aarch64/emit-relocs-553.s: New.
	* testsuite/ld-aarch64/emit-relocs-554-overflow.d: New.
	* testsuite/ld-aarch64/emit-relocs-554-overflow.s: New.
	* testsuite/ld-aarch64/emit-relocs-554.d: New.
	* testsuite/ld-aarch64/emit-relocs-554.s: New.
	* testsuite/ld-aarch64/emit-relocs-555.d: New.
	* testsuite/ld-aarch64/emit-relocs-555.s: New.
	* testsuite/ld-aarch64/emit-relocs-556-overflow.d: New.
	* testsuite/ld-aarch64/emit-relocs-556-overflow.s: New.
	* testsuite/ld-aarch64/emit-relocs-556.d: New.
	* testsuite/ld-aarch64/emit-relocs-556.s: New.
	* testsuite/ld-aarch64/emit-relocs-557.d: New.
	* testsuite/ld-aarch64/emit-relocs-557.s: New.
	* testsuite/ld-aarch64/emit-relocs-558-overflow.d: New.
	* testsuite/ld-aarch64/emit-relocs-558-overflow.s: New.
	* testsuite/ld-aarch64/emit-relocs-558.d: New.
	* testsuite/ld-aarch64/emit-relocs-558.s: New.
	* testsuite/ld-aarch64/emit-relocs-559.d: New.
	* testsuite/ld-aarch64/emit-relocs-559.s: New.
         * testsuite/ld-aarch64/emit-relocs-112-overflow.d: New.
         * testsuite/ld-aarch64/emit-relocs-112-overflow.s: New.
         * testsuite/ld-aarch64/emit-relocs-112.d: New.
         * testsuite/ld-aarch64/emit-relocs-112.s: New.
         * testsuite/ld-aarch64/emit-relocs-113.d: New.
         * testsuite/ld-aarch64/emit-relocs-113.s: New.
         * testsuite/ld-aarch64/emit-relocs-114-overflow.d: New.
         * testsuite/ld-aarch64/emit-relocs-114-overflow.s: New.
         * testsuite/ld-aarch64/emit-relocs-114.d: New.
         * testsuite/ld-aarch64/emit-relocs-114.s: New.
         * testsuite/ld-aarch64/emit-relocs-115.d: New.
         * testsuite/ld-aarch64/emit-relocs-115.s: New.
         * testsuite/ld-aarch64/emit-relocs-116-overflow.d: New.
         * testsuite/ld-aarch64/emit-relocs-116-overflow.s: New.
         * testsuite/ld-aarch64/emit-relocs-116.d: New.
         * testsuite/ld-aarch64/emit-relocs-116.s: New.
         * testsuite/ld-aarch64/emit-relocs-117.d: New.
         * testsuite/ld-aarch64/emit-relocs-117.s: New.
         * testsuite/ld-aarch64/emit-relocs-118-overflow.d: New.
         * testsuite/ld-aarch64/emit-relocs-118-overflow.s: New.
         * testsuite/ld-aarch64/emit-relocs-118.d: New.
         * testsuite/ld-aarch64/emit-relocs-118.s: New.
         * testsuite/ld-aarch64/emit-relocs-119.d: New.
         * testsuite/ld-aarch64/emit-relocs-119.s: New.

On 28/03/18 15:52, Renlin Li wrote:
> Hi all,
> 
> This patch is to add the following relocation support into binutils:
> BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12,
> BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12_NC.
> BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12,
> BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12_NC,
> BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12,
> BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12_NC,
> BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12,
> BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12_NC,
> 
> Those relocations includes both ip64 and ilp32 variant.
> Test cases are added.
> 
> This patch will resolve PR22970: https://sourceware.org/bugzilla/show_bug.cgi?id=22970
> 
> Binutils test Okay, Okay to commit?
> 
> Regards,
> Renlin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ld.patch
Type: text/x-patch
Size: 31199 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180328/8c3a53e4/attachment.bin>


More information about the Binutils mailing list