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.

llvm-svn: 149667
This commit is contained in:
Cameron Zwarich 2012-02-03 04:13:37 +00:00
parent 815b29d7c9
commit 07f0f77629
1 changed files with 2 additions and 0 deletions

View File

@ -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));