[AArch64][3/3] LD support BFD_RELOC_AARCH64_TLSLD_ADR_PREL21

Jiong Wang jiong.wang@arm.com
Fri Jul 10 08:35:00 GMT 2015


For Local Dynamic relocation, the difference with Global Dynamic is we
don't generate DTPREL, instead we always initialize the second GOT slot
, which contains TLS variable offset, into zero.  So we get module base
address when invoke runtime TLS resolver.

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

bfd/
  * elfnn-aarch64.c (IS_AARCH64_TLS_RELOC): Recognize
  BFD_RELOC_AARCH64_TLSLD_ADR_PREL21.
  (aarch64_reloc_got_type): Ditto.
  (elfNN_aarch64_final_link_relocate): Ditto.
  (elfNN_aarch64_relocate_section): Ditto.
  (elfNN_aarch64_gc_sweep_hook): Ditto.
  (elfNN_aarch64_check_relocs): Ditto.
  * elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Ditto.
  (_bfd_aarch64_elf_resolve_relocation): Ditto.

ld/testsuite/
  * ld-aarch64/tls-tiny-ld.s: New file.
  * ld-aarch64/tls-tiny-ld.d: Ditto.
  * ld-aarch64/aarch64-elf.exp: Run new test.

OK for trunk?

-- 
Regards,
Jiong

-------------- next part --------------
A non-text attachment was scrubbed...
Name: t-3.patch
Type: text/x-diff
Size: 5475 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150710/f33598c1/attachment.bin>


More information about the Binutils mailing list