From 32bd10b1a33df2cc4d067a16901d56665f4ba085 Mon Sep 17 00:00:00 2001 From: Andrew Kaylor Date: Mon, 19 Aug 2013 19:38:06 +0000 Subject: Adding comments to document RuntimeDyld relocation handling git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188697 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp') diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp index 943622fba8..a00b951e0a 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp @@ -41,6 +41,9 @@ void RuntimeDyldImpl::resolveRelocations() { // Just iterate over the sections we have and resolve all the relocations // in them. Gross overkill, but it gets the job done. for (int i = 0, e = Sections.size(); i != e; ++i) { + // The Section here (Sections[i]) refers to the section in which the + // symbol for the relocation is located. The SectionID in the relocation + // entry provides the section to which the relocation will be applied. uint64_t Addr = Sections[i].LoadAddress; DEBUG(dbgs() << "Resolving relocations Section #" << i << "\t" << format("%p", (uint8_t *)Addr) -- cgit v1.2.3