[PATCH] D69041: [yaml2obj][obj2yaml] - Do not create a symbol table by default.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 08:08:59 PDT 2019


grimar created this revision.
grimar added reviewers: labath, alexshap, MaskRay, rupprecht.
Herald added subscribers: seiya, jakehehrlich, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: jhenderson.
grimar edited the summary of this revision.

This patch tries to resolve problems faced in D68943 <https://reviews.llvm.org/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.

It touches and changes many test cases and also reveals 2 issues
(one of them is a crash) in llvm-objcopy tool. I added a TODO mark
with the descriptions to their test cases.


https://reviews.llvm.org/D69041

Files:
  include/llvm/ObjectYAML/ELFYAML.h
  lib/ObjectYAML/ELFEmitter.cpp
  test/Object/invalid.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-new-symbol-visibility.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/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/strtab-optimize.test
  test/tools/llvm-objcopy/ELF/symtab-error-on-remove-strtab.test
  test/tools/llvm-objdump/full-contents.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-versioninfo.test
  test/tools/llvm-readobj/elf-wrong-shstrtab-type.test
  test/tools/obj2yaml/elf-no-symtab.yaml
  test/tools/obj2yaml/no-symbol-reloc.test
  test/tools/yaml2obj/dynamic-symbols.yaml
  test/tools/yaml2obj/elf-custom-null-section.yaml
  test/tools/yaml2obj/elf-header-sh-fields.yaml
  test/tools/yaml2obj/implicit-sections-types.test
  test/tools/yaml2obj/implicit-sections.test
  test/tools/yaml2obj/symtab-implicit-sections-flags.yaml
  tools/obj2yaml/elf2yaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69041.225223.patch
Type: text/x-patch
Size: 31753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191016/bdaf6c46/attachment.bin>


More information about the llvm-commits mailing list