mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-30 23:20:54 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275498 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
db8566250f
commit
520a6ed0f1
BIN
test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm
Executable file
BIN
test/tools/llvm-objdump/ARM/Inputs/mh_dylib_header.macho-arm
Executable file
Binary file not shown.
7
test/tools/llvm-objdump/ARM/mh_dylib_header.test
Normal file
7
test/tools/llvm-objdump/ARM/mh_dylib_header.test
Normal file
@ -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
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user