[LLD][PowerPC] Add support for R_PPC64_TPREL34 used in TLS Local Exec
authorStefan Pintilie <stefanp@ca.ibm.com>
Tue, 15 Sep 2020 13:23:58 +0000 (08:23 -0500)
committerStefan Pintilie <stefanp@ca.ibm.com>
Tue, 15 Sep 2020 14:06:19 +0000 (09:06 -0500)
commit65f6810d3a4b0ef1fdaad49e808459fbd133bb20
tree5f9e37dc66cc3a87305afee3682306f438641628
parente1669843f2aaf1e4929afdd8f125c14536d27664
[LLD][PowerPC] Add support for R_PPC64_TPREL34 used in TLS Local Exec

Add Thread Local Storage Local Exec support to LLD. This is to support PC Relative addressing of Local Exec.
The patch teaches LLD to handle:
```
paddi r9, r13, x1@tprel
```
The relocation is:
```
R_PPC_TPREL34
```

Reviewed By: NeHuang, MaskRay

Differential Revision: https://reviews.llvm.org/D86608
lld/ELF/Arch/PPC64.cpp
lld/test/ELF/ppc64-tls-pcrel-le.s [new file with mode: 0644]