[llvm] r175643 - Adding support for absolute relocations. This occurs in ELF files when a relocation is given with no name and an undefined section. The relocation is applied with an address of zero.
Eli Bendersky
eliben at google.com
Wed Feb 20 10:15:22 PST 2013
Tiny nits below...
> Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=175643&r1=175642&r2=175643&view=diff
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Wed Feb 20 12:09:21 2013
> @@ -432,14 +432,21 @@ void RuntimeDyldImpl::resolveExternalSym
> RelocationList &Relocs = i->second;
> SymbolTableMap::const_iterator Loc = GlobalSymbolTable.find(Name);
> if (Loc == GlobalSymbolTable.end()) {
> - // This is an external symbol, try to get it address from
> - // MemoryManager.
> - uint8_t *Addr = (uint8_t*) MemMgr->getPointerToNamedFunction(Name.data(),
> + if (Name.size() == 0) {
> + // This is an absolute symbol, use an address of zero.
> + DEBUG(dbgs() << "Resolving absolute relocations." << "\n");
> + resolveRelocationList(Relocs, 0);
> + }
> + else {
LLVM style: } else {
> + // This is an external symbol, try to get it address from
s/it/its/
> +
More information about the llvm-commits
mailing list