diff options
| author | James Henderson <jh7370@my.bristol.ac.uk> | 2019-02-19 16:22:21 +0000 |
|---|---|---|
| committer | James Henderson <jh7370@my.bristol.ac.uk> | 2019-02-19 16:22:21 +0000 |
| commit | d82914c8d271cc6735d03ec07ce151d568f8b716 (patch) | |
| tree | 4e2b1a4dbfebf53c899b75c431b859d350b0eadc /llvm/lib/ObjectYAML | |
| parent | d6add7491564bc6961e9b92925fe70daa25a80e9 (diff) | |
| download | bcm5719-llvm-d82914c8d271cc6735d03ec07ce151d568f8b716.tar.gz bcm5719-llvm-d82914c8d271cc6735d03ec07ce151d568f8b716.zip | |
[yaml2obj][obj2yaml] Remove section type range markers from allowed mappings and support hex values
yaml2obj/obj2yaml previously supported SHT_LOOS, SHT_HIOS, and
SHT_LOPROC for section types. These are simply values that delineate a
range and don't really make sense as valid values. For example if a
section has type value 0x70000000, obj2yaml shouldn't print this value
as SHT_LOPROC. Additionally, this was missing the three other range
markers (SHT_HIPROC, SHT_LOUSER and SHT_HIUSER).
This change removes these three range markers. It also adds support for
specifying the type as an integer, to allow section types that LLVM
doesn't know about.
Reviewed by: grimar
Differential Revision: https://reviews.llvm.org/D58383
llvm-svn: 354344
Diffstat (limited to 'llvm/lib/ObjectYAML')
| -rw-r--r-- | llvm/lib/ObjectYAML/ELFYAML.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/ObjectYAML/ELFYAML.cpp b/llvm/lib/ObjectYAML/ELFYAML.cpp index 8460ad04cd0..7c52a6c31e4 100644 --- a/llvm/lib/ObjectYAML/ELFYAML.cpp +++ b/llvm/lib/ObjectYAML/ELFYAML.cpp @@ -446,7 +446,6 @@ void ScalarEnumerationTraits<ELFYAML::ELF_SHT>::enumeration( ECase(SHT_GROUP); ECase(SHT_SYMTAB_SHNDX); ECase(SHT_RELR); - ECase(SHT_LOOS); ECase(SHT_ANDROID_REL); ECase(SHT_ANDROID_RELA); ECase(SHT_ANDROID_RELR); @@ -459,8 +458,6 @@ void ScalarEnumerationTraits<ELFYAML::ELF_SHT>::enumeration( ECase(SHT_GNU_verdef); ECase(SHT_GNU_verneed); ECase(SHT_GNU_versym); - ECase(SHT_HIOS); - ECase(SHT_LOPROC); switch (Object->Header.Machine) { case ELF::EM_ARM: ECase(SHT_ARM_EXIDX); @@ -485,6 +482,7 @@ void ScalarEnumerationTraits<ELFYAML::ELF_SHT>::enumeration( break; } #undef ECase + IO.enumFallback<Hex32>(Value); } void ScalarBitSetTraits<ELFYAML::ELF_PF>::bitset(IO &IO, |

