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

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 13:57:55 PST 2020


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


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:51
+// however we only use 10 byte spaces when writing it out.
+constexpr unsigned SizeOfXCOFFRelocation32 = 10;
 constexpr unsigned DefaultSectionAlign = 4;
----------------
DiggerLin wrote:
> can we use sizeof(XCOFFRelocation) when using SizeOfXCOFFRelocation32 ?
No, as I'm trying to express in the comments above, the sizeof(XCOFFRelocation) is 12, but actual size is 10. 


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp:86
+  case PPC::fixup_ppc_br24:
+    Result |= 25;
+    break;
----------------
DiggerLin wrote:
> // The relocation encodes the bit length being relocated minus 1. Add back the 1 to // get the actual length being relocated.
> this one should be 23 ?
No, we have 25 in the actual object file. 


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

https://reviews.llvm.org/D72027





More information about the llvm-commits mailing list