summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
diff options
context:
space:
mode:
authorEli Bendersky <eli.bendersky@intel.com>2012-04-30 12:15:58 +0000
committerEli Bendersky <eli.bendersky@intel.com>2012-04-30 12:15:58 +0000
commit37bc5a200092f1b41da799c75da70258015e43a4 (patch)
treec8c36e8e988def301771c3335ffa965a4e0b497a /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
parent5ff30e70f8dc4ddfdb3bd6925ccdf524130a7b95 (diff)
downloadllvm-37bc5a200092f1b41da799c75da70258015e43a4.tar.gz
llvm-37bc5a200092f1b41da799c75da70258015e43a4.tar.bz2
llvm-37bc5a200092f1b41da799c75da70258015e43a4.tar.xz
It doesn't make sense to move symbol relocations to section relocations when
relocations are resolved. It's much more reasonable to do this decision when relocations are just being added - we have all the information at that point. Also a bit of renaming and extra comments to clarify extensions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
index e97e5859e0..42dd24cce1 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
@@ -129,7 +129,7 @@ protected:
// references it.
typedef std::map<SectionRef, unsigned> ObjSectionToIDMap;
- // Master symbol table. As modules are loaded and external symbols are
+ // Master symbol table. As modules are loaded and symbols are
// resolved, their addresses are stored here as a SectionID/Offset pair.
typedef std::pair<unsigned, uintptr_t> SymbolLoc;
StringMap<SymbolLoc> SymbolTable;
@@ -148,9 +148,11 @@ protected:
// source of the address. The target where the address will be writen is
// SectionID/Offset in the relocation itself.
DenseMap<unsigned, RelocationList> Relocations;
- // Relocations to external symbols that are not yet resolved.
- // Indexed by symbol name.
- StringMap<RelocationList> SymbolRelocations;
+
+ // Relocations to external symbols that are not yet resolved. Symbols are
+ // external when they aren't found in the global symbol table of all loaded
+ // modules. This map is indexed by symbol name.
+ StringMap<RelocationList> ExternalSymbolRelocations;
typedef std::map<RelocationValueRef, uintptr_t> StubMap;
@@ -235,7 +237,8 @@ protected:
LocalSymbolMap &Symbols,
StubMap &Stubs) = 0;
- void resolveSymbols();
+ /// \brief Resolve relocations to external symbols.
+ void resolveExternalSymbols();
virtual ObjectImage *createObjectImage(const MemoryBuffer *InputBuffer);
virtual void handleObjectLoaded(ObjectImage *Obj)
{