summaryrefslogtreecommitdiffstats
path: root/llvm/tools/obj2yaml
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-06 13:06:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-06 13:06:17 +0000
commite2e741ecddd672e08abd29f21d67521edb640e48 (patch)
tree23ca72baca651008fa891976e12af58b79fe21a3 /llvm/tools/obj2yaml
parentc9e304afbdbdf529fd7c97ee0353924d645b48df (diff)
downloadbcm5719-llvm-e2e741ecddd672e08abd29f21d67521edb640e48.tar.gz
bcm5719-llvm-e2e741ecddd672e08abd29f21d67521edb640e48.zip
Print symbol names in relocations when dumping COFF as YAML.
llvm-svn: 183403
Diffstat (limited to 'llvm/tools/obj2yaml')
-rw-r--r--llvm/tools/obj2yaml/coff2yaml.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/tools/obj2yaml/coff2yaml.cpp b/llvm/tools/obj2yaml/coff2yaml.cpp
index 909b269385b..0ec35bfc7e3 100644
--- a/llvm/tools/obj2yaml/coff2yaml.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud