summaryrefslogtreecommitdiffstats
path: root/tools/llvm-readobj
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r--tools/llvm-readobj/MachODumper.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp
index 10e53d9..31dc5ce 100644
--- a/tools/llvm-readobj/MachODumper.cpp
+++ b/tools/llvm-readobj/MachODumper.cpp
@@ -345,7 +345,9 @@ void MachODumper::printRelocation(const MachOObjectFile *Obj,
if (error(RelI->getOffset(Offset))) return;
if (error(RelI->getTypeName(RelocName))) return;
if (error(RelI->getSymbol(Symbol))) return;
- if (error(Symbol.getName(SymbolName))) return;
+ if (symbol_iterator(Symbol) != Obj->end_symbols() &&
+ error(Symbol.getName(SymbolName)))
+ return;
DataRefImpl DR = RelI->getRawDataRefImpl();
macho::RelocationEntry RE = Obj->getRelocation(DR);