[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 27 10:49:52 PST 2020


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


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:409
+    // plus any constant value that we might get.
+    FixedValue = SectionMap[SymASec]->Address +
+                 (SymA.isDefined() ? Layout.getSymbolOffset(SymA) : 0) +
----------------
hubert.reinterpretcast wrote:
> Is `SectionMap[SymASec]->Address` a fancy way of saying `0` for undefined symbols? If so, can we move it into the ternary expression?
SectionMap[SymASec]->Address is not just for undefined symbols. If SymA is a label inside of csect, we need to get (the csect address + the symbol offset) to get the exact address of that label. 


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

https://reviews.llvm.org/D72027





More information about the llvm-commits mailing list