mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +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:
@ -341,12 +341,11 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj,
|
||||
uint64_t Offset;
|
||||
SmallString<32> RelocName;
|
||||
StringRef SymbolName;
|
||||
SymbolRef Symbol;
|
||||
if (error(RelI->getOffset(Offset))) return;
|
||||
if (error(RelI->getTypeName(RelocName))) return;
|
||||
if (error(RelI->getSymbol(Symbol))) return;
|
||||
if (symbol_iterator(Symbol) != Obj->end_symbols() &&
|
||||
error(Symbol.getName(SymbolName)))
|
||||
symbol_iterator Symbol = RelI->getSymbol();
|
||||
if (Symbol != Obj->end_symbols() &&
|
||||
error(Symbol->getName(SymbolName)))
|
||||
return;
|
||||
|
||||
DataRefImpl DR = RelI->getRawDataRefImpl();
|
||||
|
Reference in New Issue
Block a user