diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-05 01:33:53 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-05 01:33:53 +0000 |
commit | 806f00649090e81ed478441e3edcddaef1176ee0 (patch) | |
tree | d568409a0c21e6b767feb6bdb9a1b27705505c71 /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | |
parent | e6c0144208a4352c7c50616508081278c2ee5f88 (diff) | |
download | bcm5719-llvm-806f00649090e81ed478441e3edcddaef1176ee0.tar.gz bcm5719-llvm-806f00649090e81ed478441e3edcddaef1176ee0.zip |
Handle relocations that don't point to symbols.
In ELF (as in MachO), not all relocations point to symbols. Represent this
properly by using a symbol_iterator instead of a SymbolRef. Update llvm-readobj
ELF's dumper to handle relocatios without symbols.
llvm-svn: 183284
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index 01a3fd9f82d..0384b322624 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -302,10 +302,9 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID, if (isExtern) { // Obtain the symbol name which is referenced in the relocation - SymbolRef Symbol; - RelI.getSymbol(Symbol); + symbol_iterator Symbol = RelI.getSymbol(); StringRef TargetName; - Symbol.getName(TargetName); + Symbol->getName(TargetName); // First search for the symbol in the local symbol table SymbolTableMap::const_iterator lsi = Symbols.find(TargetName.data()); if (lsi != Symbols.end()) { |