mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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:
@@ -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 <>
|
||||
|
Reference in New Issue
Block a user