diff options
author | Cameron Zwarich <zwarich@apple.com> | 2012-02-03 04:13:37 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2012-02-03 04:13:37 +0000 |
commit | aab219110994cc4d848fae5f50166a2f70ccc812 (patch) | |
tree | ac2c5d403b28ca9ebaf1623e26d2b543df1da8ad /tools | |
parent | 6e3f7e4913b17d7f8e3d81d61aa9e133f97e1ccd (diff) |
Fix llvm-objdump disassembly for interesting Mach-O binaries, e.g. any MacOS
dylib. This regressed with r145408. I will try to make a test case and add it
so that this doesn't happen again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llvm-objdump/llvm-objdump.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/llvm-objdump/llvm-objdump.cpp b/tools/llvm-objdump/llvm-objdump.cpp index fded8a1f35..44d681fc1c 100644 --- a/tools/llvm-objdump/llvm-objdump.cpp +++ b/tools/llvm-objdump/llvm-objdump.cpp @@ -189,6 +189,8 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { if (!error(i->containsSymbol(*si, contains)) && contains) { uint64_t Address; if (error(si->getAddress(Address))) break; + Address -= SectionAddr; + StringRef Name; if (error(si->getName(Name))) break; Symbols.push_back(std::make_pair(Address, Name)); |