]> granicus.if.org Git - llvm/commit
[yaml2obj][obj2yaml] Remove section type range markers from allowed mappings and...
authorJames Henderson <jh7370@my.bristol.ac.uk>
Tue, 19 Feb 2019 16:22:21 +0000 (16:22 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Tue, 19 Feb 2019 16:22:21 +0000 (16:22 +0000)
commit87f5caf3557994ba01fae5e52b7e90bf41798b03
treedc13de497bf9e2ee80815c8a63bd2d96c159925f
parentee8e40b4f1567928cd67c4467a636fae0fe38a14
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354344 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ObjectYAML/ELFYAML.cpp
test/tools/obj2yaml/section-type.yaml [new file with mode: 0644]
test/tools/yaml2obj/section-type.yaml [new file with mode: 0644]