[yaml2obj] - Allow setting custom sh_info for RawContentSection sections.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 1 Mar 2019 10:18:16 +0000 (10:18 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 1 Mar 2019 10:18:16 +0000 (10:18 +0000)
commita7ba1a0f8103f9b95aa6bfd9a92882ba62c963a8
tree9416ce9406ac361f20c820e3fc29dd5e85821422
parentb0224b1f1d06987c56a5a57fd5ccaec0c2abb151
[yaml2obj] - Allow setting custom sh_info for RawContentSection sections.

This is for tweaking SHT_SYMTAB sections.
Their sh_info contains the (number of symbols + 1) usually.
But for creating invalid inputs for test cases it would be convenient
to allow explicitly override this field from YAML.

Differential revision: https://reviews.llvm.org/D58779

llvm-svn: 355193
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/obj2yaml/elf-shinfo.yaml [new file with mode: 0644]
llvm/test/tools/yaml2obj/elf-symtab-shinfo.yaml [new file with mode: 0644]
llvm/test/tools/yaml2obj/elf-symtab-shtype.yaml [new file with mode: 0644]
llvm/tools/obj2yaml/elf2yaml.cpp
llvm/tools/yaml2obj/yaml2elf.cpp