Print symbol names in relocations when dumping COFF as YAML.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2013-06-06 13:06:17 +00:00
parent 2ed7659b88
commit e3a0e7f29d
7 changed files with 42 additions and 23 deletions

View File

@@ -35,11 +35,17 @@ inline SectionCharacteristics operator|(SectionCharacteristics a,
// The structure of the yaml files is not an exact 1:1 match to COFF. In order
// to use yaml::IO, we use these structures which are closer to the source.
namespace COFFYAML {
struct Relocation {
uint32_t VirtualAddress;
uint16_t Type;
StringRef SymbolName;
};
struct Section {
COFF::section Header;
unsigned Alignment;
object::yaml::BinaryRef SectionData;
std::vector<COFF::relocation> Relocations;
std::vector<Relocation> Relocations;
StringRef Name;
Section();
};
@@ -64,7 +70,7 @@ namespace COFFYAML {
LLVM_YAML_IS_SEQUENCE_VECTOR(COFFYAML::Section)
LLVM_YAML_IS_SEQUENCE_VECTOR(COFFYAML::Symbol)
LLVM_YAML_IS_SEQUENCE_VECTOR(COFF::relocation)
LLVM_YAML_IS_SEQUENCE_VECTOR(COFFYAML::Relocation)
namespace llvm {
namespace yaml {
@@ -105,8 +111,8 @@ struct ScalarBitSetTraits<COFF::SectionCharacteristics> {
};
template <>
struct MappingTraits<COFF::relocation> {
static void mapping(IO &IO, COFF::relocation &Rel);
struct MappingTraits<COFFYAML::Relocation> {
static void mapping(IO &IO, COFFYAML::Relocation &Rel);
};
template <>