[yaml2obj][obj2yaml] - Do not create a symbol table by default.
commit6db9c3f4c4d510a9920b801933e9d5858a52bb05
authorGeorge Rimar <grimar@accesssoftek.com>
Sun, 20 Oct 2019 14:47:17 +0000 (20 14:47 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Sun, 20 Oct 2019 14:47:17 +0000 (20 14:47 +0000)
tree9964f2ff043b7290b3725df00c5555804fc9cf8a
parent006e9de6d4175970ea769a508445930ac5c76171
[yaml2obj][obj2yaml] - Do not create a symbol table by default.

This patch tries to resolve problems faced in D68943
and uses some of the code written by Konrad Wilhelm Kleine
in that patch.

Previously, yaml2obj tool always created a .symtab section.
This patch changes that. With it we only create it when
have a "Symbols:" tag in the YAML document or when
we need to create it because it is used by another section(s).

obj2yaml follows the new behavior and does not print "Symbols:"
anymore when there is no symbol table.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375361 91177308-0d34-0410-b5e6-96231b3b80d8
62 files changed:
include/llvm/ObjectYAML/ELFYAML.h
lib/ObjectYAML/ELFEmitter.cpp
test/Object/invalid.test
test/Object/objdump-sectionheaders.test
test/tools/llvm-objcopy/ELF/add-section-remove.test
test/tools/llvm-objcopy/ELF/add-section.test
test/tools/llvm-objcopy/ELF/add-symbol.test
test/tools/llvm-objcopy/ELF/basic-only-section.test
test/tools/llvm-objcopy/ELF/explicit-keep-remove.test
test/tools/llvm-objcopy/ELF/explicit-only-section-remove.test
test/tools/llvm-objcopy/ELF/invalid-e_shoff.test
test/tools/llvm-objcopy/ELF/keep-only-section.test
test/tools/llvm-objcopy/ELF/no-strip-all.test
test/tools/llvm-objcopy/ELF/no-symbol-relocation.test
test/tools/llvm-objcopy/ELF/null-symbol.test
test/tools/llvm-objcopy/ELF/only-section-many.test
test/tools/llvm-objcopy/ELF/preserve-segment-contents-ehdr-phdrs.test
test/tools/llvm-objcopy/ELF/remove-section.test
test/tools/llvm-objcopy/ELF/rename-section-multiple.test
test/tools/llvm-objcopy/ELF/rename-section.test
test/tools/llvm-objcopy/ELF/segment-shift-section-remove.test
test/tools/llvm-objcopy/ELF/segment-test-remove-section.test
test/tools/llvm-objcopy/ELF/shstrtab-optimize.test
test/tools/llvm-objcopy/ELF/strip-unneeded-remove-debug-keep-link.test
test/tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test
test/tools/llvm-objcopy/ELF/symtab-link.test
test/tools/llvm-objcopy/ELF/wildcard-syntax.test
test/tools/llvm-objdump/full-contents.test
test/tools/llvm-objdump/relocations-elf.test
test/tools/llvm-readobj/check-output-order.test
test/tools/llvm-readobj/elf-dynamic-malformed.test
test/tools/llvm-readobj/elf-file-headers.test
test/tools/llvm-readobj/elf-hidden-versym.test
test/tools/llvm-readobj/elf-invalid-shstrndx.test
test/tools/llvm-readobj/elf-invalid-versioning.test
test/tools/llvm-readobj/elf-no-phdrs.test
test/tools/llvm-readobj/elf-no-relocs.test
test/tools/llvm-readobj/elf-relr-relocs.test
test/tools/llvm-readobj/elf-versioninfo.test
test/tools/llvm-readobj/elf-wrong-shstrtab-type.test
test/tools/llvm-readobj/reloc-types-elf-aarch64.test
test/tools/llvm-readobj/reloc-types-elf-arm.test
test/tools/llvm-readobj/reloc-types-elf-lanai.test
test/tools/llvm-readobj/reloc-types-elf-mips.test
test/tools/llvm-readobj/reloc-types-elf-mips64.test
test/tools/obj2yaml/elf-llvm-addrsig-section.yaml
test/tools/obj2yaml/elf-no-symtab.yaml [new file with mode: 0644]
test/tools/obj2yaml/elf-sht-symtab-shndx.yaml
test/tools/obj2yaml/no-symbol-reloc.test
test/tools/obj2yaml/section-group.test
test/tools/yaml2obj/dynamic-symbols.yaml
test/tools/yaml2obj/elf-comdat-broken-info.yaml
test/tools/yaml2obj/elf-custom-null-section.yaml
test/tools/yaml2obj/elf-header-sh-fields.yaml
test/tools/yaml2obj/elf-sht-symtab-shndx.yaml
test/tools/yaml2obj/implicit-sections-types.test
test/tools/yaml2obj/implicit-sections.test
test/tools/yaml2obj/invalid-symboless-relocation.yaml
test/tools/yaml2obj/reloc-sec-info.yaml
test/tools/yaml2obj/symboless-relocation.yaml
test/tools/yaml2obj/symtab-implicit-sections-flags.yaml
tools/obj2yaml/elf2yaml.cpp