OSDN Git Service

Update llvm-objdump’s Mach-O symbolizer code to print the name of symbol stubs.
authorKevin Enderby <enderby@apple.com>
Fri, 26 Sep 2014 22:20:44 +0000 (22:20 +0000)
committerKevin Enderby <enderby@apple.com>
Fri, 26 Sep 2014 22:20:44 +0000 (22:20 +0000)
commit7118c738672aab128807f97460ed7102f2b4e0b4
tree9a7a88d5e1c792397b02d8976976e639cad09e2b
parentaeb9ee02616b49064eeeacd523c74263d2e1f423
Update llvm-objdump’s Mach-O symbolizer code to print the name of symbol stubs.

So in fully linked images when a call is made through a stub it now gets a
comment like the following in the disassembly:

    callq 0x100000f6c             ## symbol stub for: _printf

indicating the call is to a symbol stub and which symbol it is for.  This is
done for branch reference types and seeing if the branch target is in a stub
section and if so using the indirect symbol table entry for that stub and
using that symbol table entries symbol name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218546 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objdump/X86/macho-symbolized-disassembly.test
tools/llvm-objdump/MachODump.cpp