[PATCH] D112063: [lld][ELF] Add first bits to support relocation relaxations for AArch64
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 22 21:41:28 PST 2021
alexander-shaposhnikov added inline comments.
================
Comment at: lld/ELF/InputSection.cpp:1031
+ secAddr += sec->outSecOff;
+ uint64_t addrLoc = secAddr + offset;
RelExpr expr = rel.expr;
----------------
MaskRay wrote:
> Why does `tryRelaxAdrpLdr` need `addrLoc`? I think you can just pass `addrLoc` to it.
I suspect you probably meant secAddr instead of addrLoc in your question (just a typo).
addrLoc equals secAddr + offset of the first relocation.
This would make the computations inside tryRelaxAdrpLdr less symmetric, I find the current version better from the readability perspective (the "coupling" / interdependence between arguments is smaller)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112063/new/
https://reviews.llvm.org/D112063
More information about the llvm-commits
mailing list