mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183284 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user