[PATCH] D73254: [ELF] Rename relocateOne() to relocate() and pass `Relocation` to it
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 00:58:05 PST 2020
grimar added inline comments.
================
Comment at: lld/ELF/Arch/PPC64.cpp:789
case R_PPC64_ADDR14: {
- checkAlignment(loc, val, 4, type);
+ checkAlignment(loc, val, 4, rel);
// Preserve the AA/LK bits in the branch instruction
----------------
In terms of the original code, seems previously this line used a new `type`, but now it uses an `originalType`.
Is it intentional and correct change?
================
Comment at: lld/ELF/Arch/PPC64.cpp:884
case R_PPC64_REL32:
- checkInt(loc, val, 32, type);
+ checkInt(loc, val, 32, rel);
write32(loc, val);
----------------
The same here and below.
================
Comment at: lld/ELF/Target.h:90
+ rel.type = type;
+ relocate(loc, rel, val);
+ }
----------------
It is probably looks a bit strange to have such piece here.
It does not look to be generic code because initializes only single field.
And it seems used only once.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73254/new/
https://reviews.llvm.org/D73254
More information about the llvm-commits
mailing list