diff options
-rwxr-xr-x | llvm/test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm | bin | 0 -> 8336 bytes | |||
-rw-r--r-- | llvm/test/tools/llvm-objdump/ARM/mh_dylib_header.test | 7 | ||||
-rw-r--r-- | llvm/tools/llvm-objdump/MachODump.cpp | 12 |
3 files changed, 14 insertions, 5 deletions
diff --git a/llvm/test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm b/llvm/test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm Binary files differnew file mode 100755 index 00000000000..5e738294163 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm diff --git a/llvm/test/tools/llvm-objdump/ARM/mh_dylib_header.test b/llvm/test/tools/llvm-objdump/ARM/mh_dylib_header.test new file mode 100644 index 00000000000..474080392c8 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/ARM/mh_dylib_header.test @@ -0,0 +1,7 @@ +RUN: llvm-objdump -d -macho %p/Inputs/mh_dylib_header.macho-arm + +CHECK: _t1: +CHECK: movw r0, #4133 + +CHECK: _a1: +CHECK: bx lr 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. |