[PATCH] D14674: [RuntimeDyld] Add accessors to `SectionEntry`; NFC
Andy Kaylor via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 20 17:41:39 PST 2015
andrew.w.kaylor added a comment.
This looks good, but there are still a bunch of places using the "([type])(getAddress() + Offset)" pattern.
================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:536
@@ -524,3 +535,3 @@
case ELF::R_MIPS_PC32: {
- uint32_t FinalAddress = (Section.LoadAddress + Offset);
+ uint32_t FinalAddress = (Section.getLoadAddressWithOffset(Offset));
writeBytesUnaligned(Value - FinalAddress, (uint8_t *)TargetPtr, 4);
----------------
The extra parens here and in the similar lines below are redundant now.
================
Comment at: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:1252
@@ -1239,1 +1251,3 @@
+ resolveRelocation(Section, Offset,
+ (uint64_t)Section.getAddress() + i->second, RelType, 0);
DEBUG(dbgs() << " Stub function found\n");
----------------
There are still some getAddress() + Offset cases here.
http://reviews.llvm.org/D14674
More information about the llvm-commits
mailing list