summaryrefslogtreecommitdiff
path: root/tools/obj2yaml/coff2yaml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/obj2yaml/coff2yaml.cpp')
-rw-r--r--tools/obj2yaml/coff2yaml.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/obj2yaml/coff2yaml.cpp b/tools/obj2yaml/coff2yaml.cpp
index 909b269385..0ec35bfc7e 100644
--- a/tools/obj2yaml/coff2yaml.cpp
+++ b/tools/obj2yaml/coff2yaml.cpp
@@ -66,13 +66,15 @@ void COFFDumper::dumpSections(unsigned NumSections) {
Obj.getSectionContents(Sect, sectionData);
Sec.SectionData = object::yaml::BinaryRef(sectionData);
- std::vector<COFF::relocation> Relocations;
+ std::vector<COFFYAML::Relocation> Relocations;
for (object::relocation_iterator rIter = iter->begin_relocations();
rIter != iter->end_relocations(); rIter.increment(ec)) {
const object::coff_relocation *reloc = Obj.getCOFFRelocation(rIter);
- COFF::relocation Rel;
+ COFFYAML::Relocation Rel;
+ object::symbol_iterator Sym = rIter->getSymbol();
+ StringRef Name;
+ Sym->getName(Rel.SymbolName);
Rel.VirtualAddress = reloc->VirtualAddress;
- Rel.SymbolTableIndex = reloc->SymbolTableIndex;
Rel.Type = reloc->Type;
Relocations.push_back(Rel);
}