[PATCH] D16892: [lld] [ELF/AArch64] Add support to some GD/LE/IS TLS relocation

Adhemerval Zanella via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 11:26:55 PST 2016


zatrazz created this revision.
zatrazz added reviewers: ruiu, rafael.
zatrazz added subscribers: llvm-commits, rengolin.
zatrazz set the repository for this revision to rL LLVM.
Herald added a subscriber: aemerson.

This patch add some TLS relocation and relaxation to TLS on AArch64.
Some Global-Dynamic relocation are handled by optimizing them to
Local-Exec (Initial-Exec is not yet supported). They are:

- R_AARCH64_TLSDESC_ADR_PAGE21
- R_AARCH64_TLSDESC_LD64_LO12_NC
- R_AARCH64_TLSDESC_ADD_LO12_NC
- R_AARCH64_TLSDESC_CALL

Also some Init-Exec is optimized to Local-Exec if possible. They are:

- R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21
- R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC

Finally some Local-Exec relocation are handled in relocateOne:

- R_AARCH64_TLSLE_ADD_TPREL_HI12
- R_AARCH64_TLSLE_ADD_TPREL_LO12_NC

This work is mainly for compiler bootstrap, where static binaries is
showing good progress (although shared object still lacking support
from both TLS aarch64 backend and some other issues).

Repository:
  rL LLVM

http://reviews.llvm.org/D16892

Files:
  ELF/Target.cpp
  ELF/Target.h
  test/ELF/aarch64-tls-gdle.s
  test/ELF/aarch64-tls-iele.s
  test/ELF/aarch64-tls-le.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16892.46933.patch
Type: text/x-patch
Size: 15629 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160204/ed28cf74/attachment.bin>


More information about the llvm-commits mailing list