diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-06 13:06:17 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-06 13:06:17 +0000 |
commit | e3a0e7f29dde261ca00835e763e26de41a8684f6 (patch) | |
tree | b3d0775b1c7e332bd720f4d991c9b9869d7b16d8 /include | |
parent | 2ed7659b88db1b0f3e5e6e6d9920c1d149159986 (diff) | |
download | external_llvm-e3a0e7f29dde261ca00835e763e26de41a8684f6.zip external_llvm-e3a0e7f29dde261ca00835e763e26de41a8684f6.tar.gz external_llvm-e3a0e7f29dde261ca00835e763e26de41a8684f6.tar.bz2 |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/COFFYAML.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/Object/COFFYAML.h b/include/llvm/Object/COFFYAML.h index 7e8aefa..3fa3ec6 100644 --- a/include/llvm/Object/COFFYAML.h +++ b/include/llvm/Object/COFFYAML.h @@ -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 <> |