[AArch64][8/8] LD support BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12

Jiong Wang jiong.wang@arm.com
Fri Jul 24 16:09:00 GMT 2015


This patch add BFD support for BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.

Note, this relocation does not go through GOT table, it's relocation
against the offset to local module TLS base address, and we must do
overflow check. I found we have some other TLS relocation types which
don't go through GOT table also, but we are doing GOT entry counting for
them, this will cause GOT table contain useless entries though no
correctness issue. I will cleanup those later.

2015-07-24  Jiong Wang  <jiong.wang@arm.com>

bfd/
  * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
  BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
  (aarch64_reloc_got_type): Likewise.
  (elfNN_aarch64_final_link_relocate): Likewise.
  (elfNN_aarch64_relocate_section): Likewise.
  * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
  (_bfd_aarch64_elf_resolve_relocation): Likewise.

ld/testsuite/
  * ld-aarch64/emit-relocs-529.s: New testcase.
  * ld-aarch64/emit-relocs-529-overflow.s: Likewise.
  * ld-aarch64/emit-relocs-86.s: Likewise.
  * ld-aarch64/emit-relocs-86-overflow.s: Likewise.
  * ld-aarch64/emit-relocs-529.d: New expectation file.
  * ld-aarch64/emit-relocs-529-overflow.d: Likewise.
  * ld-aarch64/emit-relocs-86.d: Likewise.
  * ld-aarch64/emit-relocs-86-overflow.d: Likewise.
  * ld-aarch64/aarch64-elf.exp: Run new testcases.
-- 
Regards,
Jiong

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2(3).patch
Type: text/x-diff
Size: 6499 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150724/5d5862e8/attachment.bin>


More information about the Binutils mailing list