[yaml2obj] - Improve handling of the SHT_GROUP section.
authorGeorgii Rymar <grimar@accesssoftek.com>
Mon, 28 Oct 2019 10:30:05 +0000 (13:30 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 29 Oct 2019 08:09:12 +0000 (11:09 +0300)
commit5b118a0471435751f39eeb92d56ecc3956053304
treebf63bbed8c429a3bb4a095a6df6b6196bde0e0e5
parent5a955cc8b95a88fd0489d9b0a36ec86941ba6337
[yaml2obj] - Improve handling of the SHT_GROUP section.

Currently, when we do not specify "Info" field in a YAML description
for SHT_GROUP section, yaml2obj reports an error:
"error: unknown symbol referenced: '' by YAML section '.group1'"

Also, we do not link it with a symbol table by default,
though it is what we do for AddrsigSection, HashSection, RelocationSection.
(http://www.sco.com/developers/gabi/latest/ch4.sheader.html#sh_link)

The patch fixes missings mentioned.

Differential revision: https://reviews.llvm.org/D69299
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/yaml2obj/duplicate-section-names.test
llvm/test/tools/yaml2obj/elf-comdat-broken-info.yaml
llvm/test/tools/yaml2obj/elf-comdat-broken-members.yaml
llvm/test/tools/yaml2obj/elf-comdat-broken.yaml
llvm/test/tools/yaml2obj/elf-override-shname.yaml
llvm/test/tools/yaml2obj/elf-override-shoffset.yaml
llvm/test/tools/yaml2obj/elf-override-shsize.yaml
llvm/test/tools/yaml2obj/section-link.yaml