summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-07-14 23:13:03 +0000
committerTim Northover <tnorthover@apple.com>2016-07-14 23:13:03 +0000
commitfbefee3bff6c9ce9c5d50bd2966638b6f6d7aaae (patch)
treebc8cc5a62fbbb429249c0c9af22861eceaf90f7c /llvm/tools/llvm-objdump
parent420b266d0ab01f5bfe7e3aa24f758c924aa81ea5 (diff)
downloadbcm5719-llvm-fbefee3bff6c9ce9c5d50bd2966638b6f6d7aaae.tar.gz
bcm5719-llvm-fbefee3bff6c9ce9c5d50bd2966638b6f6d7aaae.zip
llvm-objdump: extend __mh_execute_header handling to other special syms
We don't need to print any of the special __mh_*_header symbols when disassembling. Since they point at the beginning of the segment (not where the actual code is) they're pretty misleading. Should also fix lld bots. llvm-svn: 275498
Diffstat (limited to 'llvm/tools/llvm-objdump')
-rw-r--r--llvm/tools/llvm-objdump/MachODump.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp
index 991ccee47a5..4d950f1d7bd 100644
--- a/llvm/tools/llvm-objdump/MachODump.cpp
+++ b/llvm/tools/llvm-objdump/MachODump.cpp
@@ -6708,11 +6708,13 @@ static void DisassembleMachO(StringRef Filename, MachOObjectFile *MachOOF,
outs() << "-dis-symname: __mh_execute_header not in any section\n";
return;
}
- // When this code is trying to disassemble a symbol at a time and in the case
- // there is only the __mh_execute_header symbol left as in a stripped
- // executable, we need to deal with this by ignoring this symbol so the whole
- // section is disassembled and this symbol is then not displayed.
- if (SymName == "__mh_execute_header")
+ // When this code is trying to disassemble a symbol at a time and in the
+ // case there is only the __mh_execute_header symbol left as in a stripped
+ // executable, we need to deal with this by ignoring this symbol so the
+ // whole section is disassembled and this symbol is then not displayed.
+ if (SymName == "__mh_execute_header" || SymName == "__mh_dylib_header" ||
+ SymName == "__mh_bundle_header" || SymName == "__mh_object_header" ||
+ SymName == "__mh_preload_header" || SymName == "__mh_dylinker_header")
continue;
// If we are only disassembling one symbol see if this is that symbol.
OpenPOWER on IntegriCloud