[PATCH] D89211: [RTDYLD] add debug statements for resolveX86Relocation
Valentin Churavy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 11 11:21:25 PDT 2020
vchuravy created this revision.
vchuravy added a reviewer: lhames.
Herald added subscribers: llvm-commits, pengfei, hiraditya.
Herald added a project: LLVM.
vchuravy requested review of this revision.
Adds some debug statements to `resolveX86Relocation` so that the next person doesn't have to diff the object to figure out what changed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89211
Files:
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
Index: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
===================================================================
--- llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+++ llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
@@ -343,6 +343,8 @@
case ELF::R_386_32: {
support::ulittle32_t::ref(Section.getAddressWithOffset(Offset)) =
Value + Addend;
+ LLVM_DEBUG(dbgs() << "Writing " << format("%p", (Value + Addend)) << " at "
+ << format("%p\n", Section.getAddressWithOffset(Offset)));
break;
}
// Handle R_386_PLT32 like R_386_PC32 since it should be able to
@@ -354,6 +356,8 @@
uint32_t RealOffset = Value + Addend - FinalAddress;
support::ulittle32_t::ref(Section.getAddressWithOffset(Offset)) =
RealOffset;
+ LLVM_DEBUG(dbgs() << "Writing " << format("%p", RealOffset << " at "
+ << format("%p\n", Section.getAddressWithOffset(Offset)));
break;
}
default:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89211.297479.patch
Type: text/x-patch
Size: 993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201011/b7cf354d/attachment.bin>
More information about the llvm-commits
mailing list