[obj2yaml] Support ELF input format in the obj2yaml tool.

The ELF header e_flags field in the MIPS related test cases handled
incorrectly. The obj2yaml prints too many flags. I will fix that in the
next patches.

The patch reviewed by Michael Spencer and Sean Silva.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208752 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Simon Atanasyan
2014-05-14 05:07:47 +00:00
parent 0fe443d893
commit b8236e532a
6 changed files with 545 additions and 3 deletions

View File

@ -670,7 +670,8 @@ void MappingTraits<std::unique_ptr<ELFYAML::Section>>::mapping(
ELFYAML::ELF_SHT sectionType;
if (IO.outputting())
sectionType = Section->Type;
IO.mapRequired("Type", sectionType);
else
IO.mapRequired("Type", sectionType);
switch (sectionType) {
case ELF::SHT_REL: