llvm.org GIT mirror llvm / 520a6ed
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 Tim Northover 4 years ago
3 changed file(s) with 14 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
0 RUN: llvm-objdump -d -macho %p/Inputs/mh_dylib_header.macho-arm
1
2 CHECK: _t1:
3 CHECK: movw r0, #4133
4
5 CHECK: _a1:
6 CHECK: bx lr
67076707 outs() << "-dis-symname: __mh_execute_header not in any section\n";
67086708 return;
67096709 }
6710 // When this code is trying to disassemble a symbol at a time and in the case
6711 // there is only the __mh_execute_header symbol left as in a stripped
6712 // executable, we need to deal with this by ignoring this symbol so the whole
6713 // section is disassembled and this symbol is then not displayed.
6714 if (SymName == "__mh_execute_header")
6710 // When this code is trying to disassemble a symbol at a time and in the
6711 // case there is only the __mh_execute_header symbol left as in a stripped
6712 // executable, we need to deal with this by ignoring this symbol so the
6713 // whole section is disassembled and this symbol is then not displayed.
6714 if (SymName == "__mh_execute_header" || SymName == "__mh_dylib_header" ||
6715 SymName == "__mh_bundle_header" || SymName == "__mh_object_header" ||
6716 SymName == "__mh_preload_header" || SymName == "__mh_dylinker_header")
67156717 continue;
67166718
67176719 // If we are only disassembling one symbol see if this is that symbol.