[PATCH] D87504: [PowerPC][LLD] Support for PC Relative TLS for Local Dynamic
Stefan Pintilie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 03:55:43 PDT 2020
stefanp created this revision.
stefanp added a reviewer: nemanjai.
Herald added subscribers: shchenz, kbarton, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: MaskRay.
Herald added a project: LLVM.
stefanp requested review of this revision.
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
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87504
Files:
lld/ELF/Arch/PPC64.cpp
lld/ELF/Relocations.cpp
lld/test/ELF/ppc64-tls-pcrel-ld.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87504.291177.patch
Type: text/x-patch
Size: 7827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200911/de0450be/attachment.bin>
More information about the llvm-commits
mailing list