[all-commits] [llvm/llvm-project] c6561c: [PowerPC][LLD] Support for PC Relative TLS for Loc...
stefanp-ibm via All-commits
all-commits at lists.llvm.org
Fri Oct 23 06:24:45 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: c6561ccfd982f03fc9f572c6c27ddab336158e18
https://github.com/llvm/llvm-project/commit/c6561ccfd982f03fc9f572c6c27ddab336158e18
Author: Stefan Pintilie <stefanp at ca.ibm.com>
Date: 2020-10-23 (Fri, 23 Oct 2020)
Changed paths:
M lld/ELF/Arch/PPC64.cpp
M lld/ELF/Relocations.cpp
A lld/test/ELF/ppc64-tls-pcrel-ld.s
Log Message:
-----------
[PowerPC][LLD] Support for PC Relative TLS for Local Dynamic
Add support to LLD for PC Relative Thread Local Storage for Local Dynamic.
This patch adds support for two relocations: R_PPC64_GOT_TLSLD_PCREL34 and
R_PPC64_DTPREL34.
The Local Dynamic code is:
```
pla r3, x at got@tlsld at pcrel R_PPC64_GOT_TLSLD_PCREL34
bl __tls_get_addr at notoc(x at tlsld) R_PPC64_TLSLD
R_PPC64_REL24_NOTOC
...
paddi r9, r3, x at dtprel R_PPC64_DTPREL34
```
After relaxation to Local Exec:
```
paddi r3, r13, 0x1000
nop
...
paddi r9, r3, x at dtprel R_PPC64_DTPREL34
```
Reviewed By: NeHuang, sfertile
Differential Revision: https://reviews.llvm.org/D87504
More information about the All-commits
mailing list