[PATCH] D92114: [X86] Don't emit R_X86_64_[REX_]GOTPCRELX for a GOT load with an offset
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 26 09:20:28 PST 2020
MaskRay added inline comments.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp:401-402
+ unsigned FixupKind = [&]() {
+ // Enable relaxed relocation only for a MCSymbolRefExpr. We cannot
+ // enabled relaxed relocation if an offset is present (e.g. x at GOTPCREL+4).
+ if (!(Disp.isExpr() && isa<MCSymbolRefExpr>(Disp.getExpr())))
----------------
jhenderson wrote:
> I think we should keep the old comment, at least in part, since it may not be obvious to a future developer what a "relaxed relocation form" actually means in practice. We can then just add this new comment after it, saying why we don't emit such a relocation for all situations.
The old comment was about "movq loads". I moved it below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92114/new/
https://reviews.llvm.org/D92114
More information about the llvm-commits
mailing list