[all-commits] [llvm/llvm-project] f72d00: llvm-objdump should ignore Mach-O stab symbols for...
Michael Trent via All-commits
all-commits at lists.llvm.org
Fri Dec 20 15:20:57 PST 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f72d001e099871fd5943679a8377f2fcc675f860
https://github.com/llvm/llvm-project/commit/f72d001e099871fd5943679a8377f2fcc675f860
Author: Michael Trent <mtrent at apple.com>
Date: 2019-12-20 (Fri, 20 Dec 2019)
Changed paths:
A llvm/test/tools/llvm-objdump/Inputs/macho-stabs-x86_64
A llvm/test/tools/llvm-objdump/macho-stabs.test
M llvm/tools/llvm-objdump/llvm-objdump.cpp
Log Message:
-----------
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
More information about the All-commits
mailing list