OSDN Git Service

[llvm-objdump] support -rebase option for mach-o to dump rebasing info
authorNick Kledzik <kledzik@apple.com>
Fri, 12 Sep 2014 21:34:15 +0000 (21:34 +0000)
committerNick Kledzik <kledzik@apple.com>
Fri, 12 Sep 2014 21:34:15 +0000 (21:34 +0000)
commita240fc5cb9fce856f18adb8bfa7f304743ac6898
tree289e427ce04ace01c90f08f809ffe59c5ce83b6b
parent824444e97a5a8f75ca913cfa676587721204487f
[llvm-objdump] support -rebase option for mach-o to dump rebasing info

Similar to my previous -exports-trie option, the -rebase option dumps info from
the LC_DYLD_INFO load command. The rebasing info is a list of the the locations
that dyld needs to adjust if a mach-o image is not loaded at its preferred
address. Since ASLR is now the default, images almost never load at their
preferred address, and thus need to be rebased by dyld.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217709 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/MachO.h
lib/Object/MachOObjectFile.cpp
test/tools/llvm-objdump/Inputs/rebase.macho-x86_64 [new file with mode: 0755]
test/tools/llvm-objdump/macho-rebase.test [new file with mode: 0644]
tools/llvm-objdump/MachODump.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-objdump/llvm-objdump.h