[llvm-commits] [llvm] r149667 - /llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Cameron Zwarich
zwarich at apple.com
Thu Feb 2 20:13:37 PST 2012
Author: zwarich
Date: Thu Feb 2 22:13:37 2012
New Revision: 149667
URL: http://llvm.org/viewvc/llvm-project?rev=149667&view=rev
Log:
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.
Modified:
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=149667&r1=149666&r2=149667&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Thu Feb 2 22:13:37 2012
@@ -189,6 +189,8 @@
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));
More information about the llvm-commits
mailing list