diff options
author | Sean Silva <silvas@purdue.edu> | 2013-06-19 00:11:59 +0000 |
---|---|---|
committer | Sean Silva <silvas@purdue.edu> | 2013-06-19 00:11:59 +0000 |
commit | 5ba1225fb074f8035668637292d994d4c39757d1 (patch) | |
tree | 6e80c771ce271284279776d09b8a5ec22a119dce /include | |
parent | 70a3dc1bc2b16748a8a79d1d11d2b1603c38c032 (diff) | |
download | external_llvm-5ba1225fb074f8035668637292d994d4c39757d1.zip external_llvm-5ba1225fb074f8035668637292d994d4c39757d1.tar.gz external_llvm-5ba1225fb074f8035668637292d994d4c39757d1.tar.bz2 |
[yaml2obj][ELF] Support st_info through `Binding` and `Type` YAML keys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Object/ELFYAML.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Object/ELFYAML.h b/include/llvm/Object/ELFYAML.h index d6ce525..317848b 100644 --- a/include/llvm/Object/ELFYAML.h +++ b/include/llvm/Object/ELFYAML.h @@ -39,6 +39,8 @@ LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFDATA) LLVM_YAML_STRONG_TYPEDEF(uint32_t, ELF_SHT) // Just use 64, since it can hold 32-bit values too. LLVM_YAML_STRONG_TYPEDEF(uint64_t, ELF_SHF) +LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STB) +LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STT) // For now, hardcode 64 bits everywhere that 32 or 64 would be needed // since 64-bit can hold 32-bit values too. @@ -51,6 +53,8 @@ struct FileHeader { }; struct Symbol { StringRef Name; + ELF_STB Binding; + ELF_STT Type; }; struct Section { StringRef Name; @@ -108,6 +112,16 @@ struct ScalarBitSetTraits<ELFYAML::ELF_SHF> { }; template <> +struct ScalarEnumerationTraits<ELFYAML::ELF_STB> { + static void enumeration(IO &IO, ELFYAML::ELF_STB &Value); +}; + +template <> +struct ScalarEnumerationTraits<ELFYAML::ELF_STT> { + static void enumeration(IO &IO, ELFYAML::ELF_STT &Value); +}; + +template <> struct MappingTraits<ELFYAML::FileHeader> { static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr); }; |