[PATCH] D84549: [XCOFF][AIX] Support relocation generation for large code model
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 10:53:56 PDT 2020
DiggerLin added inline comments.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:432
+ else if (Type == XCOFF::RelocationType::R_TOC ||
+ Type == XCOFF::RelocationType::R_TOCL)
// The FixedValue should be the TC entry offset from TOC-base.
----------------
I just wonder why there is no Type == XCOFF::RelocationType::R_TOCU ? we do not need to applyFixup for the instruction ?
addis 3, L..C0 at u(2) ?
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:434
// The FixedValue should be the TC entry offset from TOC-base.
FixedValue = SectionMap[SymASec]->Address - TOCCsects.front().Address;
----------------
I am not sure whether I understand is correct or not ?
FixedValue of intructions
addis 3, L..C0 at u(2) . FixedValue should get the high 16bits of SectionMap[SymASec]->Address - TOCCsects.front().Address;
lwz 3, L..C0 at l(3) FixedValue should get the low 16bits of SectionMap[SymASec]->Address - TOCCsects.front().Address;
if I understand correct , the code need to change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84549/new/
https://reviews.llvm.org/D84549
More information about the llvm-commits
mailing list