[PATCH] D87318: [LLD][PowerPC] Add support for R_PPC64_GOT_TLSGD_PCREL34 used in TLS General Dynamic
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 06:00:14 PDT 2020
nemanjai added a comment.
If I'm not mistaken, this patch is dependent on another one. If so, please add the dependency in the review.
================
Comment at: lld/ELF/Arch/PPC64.cpp:1365
+ if (type == R_PPC64_GOT_TLSGD_PCREL34 && expr == R_RELAX_TLS_GD_TO_IE)
+ return R_RELAX_TLS_GD_TO_IE;
+
----------------
Maybe just `return expr`? Or we can simply omit this and change the below condition to
`if (type != R_PPC64_GOT_TLSGD_PCREL34 && expr == R_RELAX_TLS_GD_TO_IE)`
================
Comment at: lld/ELF/Relocations.cpp:1341
+
+ // Offset R_PPC64_TLSGD by one byte in the NOTOC case.
+ // For the TOC case the relocaiton should always be 4 byte aligned
----------------
I think you should mention here that we look at the next relocation to see if it is a NOTOC relocation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87318/new/
https://reviews.llvm.org/D87318
More information about the llvm-commits
mailing list