diff options
author | Owen Anderson <resistor@mac.com> | 2011-11-07 17:21:36 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-11-07 17:21:36 +0000 |
commit | 7d3f8b8e48854b890762ccb96f7817568541732b (patch) | |
tree | 63395c1c503f6afa5e7f8096e21de369bba84b3d /tools/llvm-objdump | |
parent | 19a4daff9bbe18dab2620e25ac6cbf0635639ec6 (diff) | |
download | external_llvm-7d3f8b8e48854b890762ccb96f7817568541732b.zip external_llvm-7d3f8b8e48854b890762ccb96f7817568541732b.tar.gz external_llvm-7d3f8b8e48854b890762ccb96f7817568541732b.tar.bz2 |
Fix llvm-objdump's MachO mode to not depend on the value returned by RelocationRef::getInfo().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143966 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-objdump')
-rw-r--r-- | tools/llvm-objdump/MachODump.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/llvm-objdump/MachODump.cpp b/tools/llvm-objdump/MachODump.cpp index a539f1d..4ccae51 100644 --- a/tools/llvm-objdump/MachODump.cpp +++ b/tools/llvm-objdump/MachODump.cpp @@ -385,7 +385,7 @@ void llvm::DisassembleInputMachO(StringRef Filename) { bool symbolTableWorked = false; // Parse relocations. - std::vector<std::pair<uint64_t, uint32_t> > Relocs; + std::vector<std::pair<uint64_t, SymbolRef> > Relocs; error_code ec; for (relocation_iterator RI = Sections[SectIdx].begin_relocations(), RE = Sections[SectIdx].end_relocations(); RI != RE; RI.increment(ec)) { @@ -394,10 +394,10 @@ void llvm::DisassembleInputMachO(StringRef Filename) { Sections[SectIdx].getAddress(SectionAddress); RelocOffset -= SectionAddress; - uint64_t RelocInfo; - RI->getType(RelocInfo); + SymbolRef RelocSym; + RI->getSymbol(RelocSym); - Relocs.push_back(std::make_pair(RelocOffset, RelocInfo)); + Relocs.push_back(std::make_pair(RelocOffset, RelocSym)); } array_pod_sort(Relocs.begin(), Relocs.end()); @@ -594,8 +594,8 @@ void llvm::DisassembleInputMachO(StringRef Filename) { Relocs[j].first < SectAddress + Inst.Address + Inst.Size) { StringRef SymName; uint64_t Addr; - UnsortedSymbols[Relocs[j].second].getName(SymName); - UnsortedSymbols[Relocs[j].second].getAddress(Addr); + Relocs[j].second.getAddress(Addr); + Relocs[j].second.getName(SymName); outs() << "\t# " << SymName << ' '; DumpAddress(Addr, Sections, MachOObj, outs()); |