[yaml2obj] - Make .symtab to be not mandatory section for SHT_REL[A] section.
authorGeorgii Rymar <grimar@accesssoftek.com>
Mon, 28 Oct 2019 10:47:44 +0000 (13:47 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 29 Oct 2019 08:43:12 +0000 (11:43 +0300)
commit3fe7f1dcf44ced0648fd0aef2b33056bbee37881
tree47b820fef886813a9e006d985ff0edd6f54deb6c
parent5b118a0471435751f39eeb92d56ecc3956053304
[yaml2obj] - Make .symtab to be not mandatory section for SHT_REL[A] section.

Before this change .symtab section was required for SHT_REL[A] section
declarations. yaml2obj automatically defined it in case when YAML document
did not have it.

With this change it is now possible to produce an object that
has a relocation section, but has no symbol table.

It simplifies the code and also it is inline with how we handle Link fields
for another special sections.

Differential revision: https://reviews.llvm.org/D69260
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/test/Object/invalid.test
llvm/test/Object/objdump-sectionheaders.test
llvm/test/tools/llvm-objcopy/ELF/no-symbol-relocation.test
llvm/test/tools/llvm-readobj/all.test
llvm/test/tools/llvm-readobj/elf-reloc-negative-addend-no-sym.test
llvm/test/tools/obj2yaml/elf-ppc64-relocations.yaml
llvm/test/tools/obj2yaml/no-symbol-reloc.test
llvm/test/tools/obj2yaml/relocation-unsupported-machine.yaml