This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj][obj2yaml] Remove section type range markers from allowed mappings and support hex values
ClosedPublic

Authored by jhenderson on Feb 19 2019, 7:15 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

jhenderson created this revision.Feb 19 2019, 7:15 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2019, 7:15 AM
grimar accepted this revision.Feb 19 2019, 7:20 AM

Reasonable. LGTM with a nit.

test/tools/yaml2obj/section-type.yaml
3 ↗(On Diff #187362)

nit: please add an empty line after RUN to be consistent with the test for obj2yaml.

This revision is now accepted and ready to land.Feb 19 2019, 7:20 AM
This revision was automatically updated to reflect the committed changes.