llvm-project/llvm/tools/llvm-objdump
Michael Trent f72d001e09 llvm-objdump should ignore Mach-O stab symbols for disassembly.
Summary:
llvm-objdump will commonly error out when disassembling a Mach-O binary with
stab symbols, or when printing a Mach-O symbol table that includesstab symbols.
That is because the Mach-O N_OSO symbol has been modified to include the
bottom 8-bit value of the Mach-O's cpusubtype value in the section field. In
general, one cannot blindly assume a stab symbol's section field is valid
unless one has actually consulted the specification for the specific stab.

Since objdump mostly just walks the symbol table to get mnemonics for code
disassembly it's best for objdump to just ignore stab symbols. llvm-nm will
do a more complete and correct job of displaying Mach-O symbol table contents.

Reviewers: pete, lhames, ab, thegameg, jhenderson, MaskRay

Reviewed By: thegameg, MaskRay

Subscribers: MaskRay, rupprecht, seiya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71394
2019-12-20 15:20:53 -08:00
..
CMakeLists.txt Fix debug build by adding missing dependencies on libBinaryFormat 2018-05-15 00:46:43 +00:00
COFFDump.cpp [llvm-objdump] - Cleanup the error reporting. 2019-08-21 11:07:31 +00:00
ELFDump.cpp [ELF] Support for PT_GNU_PROPERTY in header and tools 2019-12-04 15:38:12 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MachODump.cpp [Mips] Use appropriate private label prefix based on Mips ABI 2019-10-23 12:24:35 +02:00
WasmDump.cpp [llvm-objdump] Wrap things in namespace llvm 2019-04-15 15:31:42 +00:00
llvm-objdump.cpp llvm-objdump should ignore Mach-O stab symbols for disassembly. 2019-12-20 15:20:53 -08:00
llvm-objdump.h Reland [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index. 2019-10-17 21:55:43 +00:00