[PATCH] D72027: [XCOFF][AIX] Support basic relocation type on AIX

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 07:07:16 PST 2020


jasonliu marked 3 inline comments as done.
jasonliu added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp:49
+  // Set the Sign Bit if needed.
+  if (IsPCRel)
+    SignAndSize |= SignBitMask;
----------------
daltenty wrote:
> I'm not sure that using IsPCRel this way makes sense, see R_TOC note below.
Addressed below. 


================
Comment at: llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll:85
+; RELOC-NEXT:     Symbol: globalA (18)
+; RELOC-NEXT:     IsSigned: No
+; RELOC-NEXT:     FixupBitValue: 0
----------------
daltenty wrote:
> For the R_TOC relocation, shouldn't this be signed as this is a displacement?
The relocation reference for toc entry should always be unsigned, because it is relative to the TOC anchor, and TOC entry has to come after TOC anchor. 


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

https://reviews.llvm.org/D72027





More information about the llvm-commits mailing list