[PATCH] D63333: [ELF][ARM] Merge handleARMTlsRelocation() into handleTlsRelocation()

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 06:49:46 PDT 2019


MaskRay created this revision.
MaskRay added reviewers: grimar, jrtc27, pcc, peter.smith, PkmX, ruiu.
Herald added subscribers: llvm-commits, kristof.beyls, arichardson, javed.absar, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

ARM and RISC-V do not support TLS relaxations. However, for General
Dynamic and Local Dynamic models, if we are producing an executable and
the symbol is non-preemptable, we know it must be defined and the
R_ARM_TLS_DTPMOD32/R_RISCV_TLS_DTPMOD{32,64} dynamic relocation can be
omitted because it is always 1.

Merge handleARMTlsRelocation() into handleTlsRelocation(). This
requires to add logic to R_TLSGD_PC and R_TLSLD_PC. As a bonus, the
additional logic in R_TLSGD_PC code can be shared by the TLS support for
RISC-V (D63220 <https://reviews.llvm.org/D63220>).


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D63333

Files:
  ELF/Relocations.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63333.204760.patch
Type: text/x-patch
Size: 6717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190614/9898f4fa/attachment.bin>


More information about the llvm-commits mailing list