git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143966
91177308-0d34-0410-b5e6-
96231b3b80d8
bool symbolTableWorked = false;
// Parse relocations.
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)) {
error_code ec;
for (relocation_iterator RI = Sections[SectIdx].begin_relocations(),
RE = Sections[SectIdx].end_relocations(); RI != RE; RI.increment(ec)) {
Sections[SectIdx].getAddress(SectionAddress);
RelocOffset -= SectionAddress;
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());
}
array_pod_sort(Relocs.begin(), Relocs.end());
Relocs[j].first < SectAddress + Inst.Address + Inst.Size) {
StringRef SymName;
uint64_t Addr;
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());
outs() << "\t# " << SymName << ' ';
DumpAddress(Addr, Sections, MachOObj, outs());