[PATCH] D85994: [LLD][PowerPC] Add check in LLD to produce an error for missing TLSGD/TLSLD

Victor Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 15:24:50 PDT 2020


NeHuang added inline comments.


================
Comment at: lld/ELF/Relocations.cpp:1332
+        RelType prevType = prevRel.getType(config->isMips64EL);
+        if(prevRel.r_offset != rel.r_offset ||
+           (prevType != R_PPC64_TLSGD && prevType != R_PPC64_TLSLD))
----------------
MaskRay wrote:
> `if `
Why do we also need `prevRel.r_offset != rel.r_offset`? Is it for the case that previous relocation type is `R_PPC64_TLSGD` or `R_PPC64_TLSLD` but with a wrong relocation offset?



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85994/new/

https://reviews.llvm.org/D85994



More information about the llvm-commits mailing list