aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Object/COFFYAML.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/COFFYAML.h')
-rw-r--r--include/llvm/Object/COFFYAML.h14
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 <>