[all-commits] [llvm/llvm-project] a6436b: [yaml2obj] - Make the 'Machine' key optional.

Georgii Rymar via All-commits all-commits at lists.llvm.org
Thu Aug 20 01:41:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a6436b0b3a7fd9f13d7a059a6a78544a7e0b702f
      https://github.com/llvm/llvm-project/commit/a6436b0b3a7fd9f13d7a059a6a78544a7e0b702f
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-08-20 (Thu, 20 Aug 2020)

  Changed paths:
    M llvm/include/llvm/ObjectYAML/ELFYAML.h
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/lib/ObjectYAML/ELFYAML.cpp
    M llvm/test/tools/llvm-readobj/ELF/addrsig.test
    M llvm/test/tools/llvm-readobj/ELF/broken-dynamic-reloc.test
    M llvm/test/tools/llvm-readobj/ELF/broken-dynsym-link.test
    M llvm/test/tools/llvm-readobj/ELF/call-graph-profile.test
    M llvm/test/tools/llvm-readobj/ELF/check-output-order.test
    M llvm/test/tools/llvm-readobj/ELF/dependent-libraries.test
    M llvm/test/tools/llvm-readobj/ELF/dyn-symbols-size-from-hash-table.test
    M llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
    M llvm/test/tools/llvm-readobj/ELF/dynamic-empty.test
    M llvm/test/tools/llvm-readobj/ELF/dynamic-malformed.test
    M llvm/test/tools/llvm-readobj/ELF/dynamic-not-in-pt-dynamic.test
    M llvm/test/tools/llvm-readobj/ELF/dynamic-reloc.test
    M llvm/test/tools/llvm-readobj/ELF/dynamic-table-dtnull.s
    M llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
    M llvm/test/tools/llvm-readobj/ELF/file-header-abi-version.test
    M llvm/test/tools/llvm-readobj/ELF/file-header-os-abi.test
    M llvm/test/tools/llvm-readobj/ELF/file-name.test
    M llvm/test/tools/llvm-readobj/ELF/file-types.test
    M llvm/test/tools/llvm-readobj/ELF/gnu-note-size.test
    M llvm/test/tools/llvm-readobj/ELF/gnu-notes.test
    M llvm/test/tools/llvm-readobj/ELF/gnu-section-mapping-no-phdrs.test
    M llvm/test/tools/llvm-readobj/ELF/gnu-section-mapping.test
    M llvm/test/tools/llvm-readobj/ELF/gnuhash.test
    M llvm/test/tools/llvm-readobj/ELF/groups.test
    M llvm/test/tools/llvm-readobj/ELF/hash-histogram.test
    M llvm/test/tools/llvm-readobj/ELF/hash-symbols.test
    M llvm/test/tools/llvm-readobj/ELF/hash-table.test
    M llvm/test/tools/llvm-readobj/ELF/headers.test
    M llvm/test/tools/llvm-readobj/ELF/hex-dump.test
    M llvm/test/tools/llvm-readobj/ELF/hidden-versym.test
    M llvm/test/tools/llvm-readobj/ELF/invalid-shstrndx.test
    M llvm/test/tools/llvm-readobj/ELF/linker-options.test
    M llvm/test/tools/llvm-readobj/ELF/malformed-pt-dynamic.test
    M llvm/test/tools/llvm-readobj/ELF/many-sections.s
    M llvm/test/tools/llvm-readobj/ELF/needed-libs.test
    M llvm/test/tools/llvm-readobj/ELF/no-phdrs.test
    M llvm/test/tools/llvm-readobj/ELF/no-relocs.test
    M llvm/test/tools/llvm-readobj/ELF/no-shdrs.test
    M llvm/test/tools/llvm-readobj/ELF/non-dynamic-in-pt-dynamic.test
    M llvm/test/tools/llvm-readobj/ELF/note-amdgpu.test
    M llvm/test/tools/llvm-readobj/ELF/note-core-ntfile-bad.test
    M llvm/test/tools/llvm-readobj/ELF/note-core-ntfile.test
    M llvm/test/tools/llvm-readobj/ELF/note-core.test
    M llvm/test/tools/llvm-readobj/ELF/program-headers.test
    M llvm/test/tools/llvm-readobj/ELF/section-flags-os-proc.test
    M llvm/test/tools/llvm-readobj/ELF/section-flags.test
    M llvm/test/tools/llvm-readobj/ELF/section-symbols.test
    M llvm/test/tools/llvm-readobj/ELF/section-types.test
    M llvm/test/tools/llvm-readobj/ELF/sections-no-section-header-string-table.test
    M llvm/test/tools/llvm-readobj/ELF/sections.test
    M llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
    M llvm/test/tools/llvm-readobj/ELF/stackmap.test
    M llvm/test/tools/llvm-readobj/ELF/string-dump.test
    M llvm/test/tools/llvm-readobj/ELF/symbol-64bit.test
    M llvm/test/tools/llvm-readobj/ELF/symbol-binding.test
    M llvm/test/tools/llvm-readobj/ELF/symbol-shndx.test
    M llvm/test/tools/llvm-readobj/ELF/symbol-types.test
    M llvm/test/tools/llvm-readobj/ELF/symbol-visibility.test
    M llvm/test/tools/llvm-readobj/ELF/symbols.test
    M llvm/test/tools/llvm-readobj/ELF/thin-archive-paths.test
    M llvm/test/tools/llvm-readobj/ELF/types.test
    M llvm/test/tools/llvm-readobj/ELF/unwind.test
    M llvm/test/tools/llvm-readobj/ELF/verdef-invalid.test
    M llvm/test/tools/llvm-readobj/ELF/verneed-flags.yaml
    M llvm/test/tools/llvm-readobj/ELF/verneed-invalid.test
    M llvm/test/tools/llvm-readobj/ELF/versioninfo.test
    M llvm/test/tools/llvm-readobj/ELF/versym-invalid.test
    M llvm/test/tools/llvm-readobj/ELF/wrong-shstrtab-type.test
    M llvm/test/tools/obj2yaml/ELF/DWARF/debug-aranges.yaml
    M llvm/test/tools/obj2yaml/ELF/call-graph-profile-section.yaml
    M llvm/test/tools/obj2yaml/ELF/duplicate-symbol-and-section-names.yaml
    M llvm/test/tools/obj2yaml/ELF/dynamic-section.yaml
    M llvm/test/tools/obj2yaml/ELF/entsize.yaml
    M llvm/test/tools/obj2yaml/ELF/gnu-hash-section.yaml
    M llvm/test/tools/obj2yaml/ELF/gnu-unique-symbols.yaml
    M llvm/test/tools/obj2yaml/ELF/hash-section.yaml
    M llvm/test/tools/obj2yaml/ELF/implicit-sections-order.yaml
    M llvm/test/tools/obj2yaml/ELF/invalid-section-name.yaml
    M llvm/test/tools/obj2yaml/ELF/linker-options.yaml
    M llvm/test/tools/obj2yaml/ELF/llvm-addrsig-section.yaml
    M llvm/test/tools/obj2yaml/ELF/llvm-deplibs-section.yaml
    M llvm/test/tools/obj2yaml/ELF/no-symtab.yaml
    M llvm/test/tools/obj2yaml/ELF/note-section.yaml
    M llvm/test/tools/obj2yaml/ELF/null-section.yaml
    M llvm/test/tools/obj2yaml/ELF/program-headers.yaml
    M llvm/test/tools/obj2yaml/ELF/rel-rela-section.yaml
    M llvm/test/tools/obj2yaml/ELF/reladyn-section-shinfo.yaml
    M llvm/test/tools/obj2yaml/ELF/relr-section.yaml
    M llvm/test/tools/obj2yaml/ELF/section-group.yaml
    M llvm/test/tools/obj2yaml/ELF/sections-info.yaml
    M llvm/test/tools/obj2yaml/ELF/shinfo.yaml
    M llvm/test/tools/obj2yaml/ELF/shlink.yaml
    M llvm/test/tools/obj2yaml/ELF/sht-symtab-shndx.yaml
    M llvm/test/tools/obj2yaml/ELF/stack-sizes.yaml
    M llvm/test/tools/obj2yaml/ELF/symbol-type.yaml
    M llvm/test/tools/obj2yaml/ELF/symbol-visibility.yaml
    M llvm/test/tools/obj2yaml/ELF/verdef-section.yaml
    M llvm/test/tools/obj2yaml/ELF/verneed-section.yaml
    M llvm/test/tools/obj2yaml/ELF/versym-section.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-abbrev.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-addr.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-aranges.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-gnu-pubnames.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-gnu-pubtypes.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-line.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-loclists.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-pubnames.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-pubtypes.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-ranges.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-rnglists.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-str-offsets.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/debug-str.yaml
    M llvm/test/tools/yaml2obj/ELF/DWARF/empty-dwarf-entry.yaml
    M llvm/test/tools/yaml2obj/ELF/abiversion.yaml
    M llvm/test/tools/yaml2obj/ELF/call-graph-profile-section.yaml
    M llvm/test/tools/yaml2obj/ELF/class-endianness.yaml
    M llvm/test/tools/yaml2obj/ELF/comdat-broken-info.yaml
    M llvm/test/tools/yaml2obj/ELF/comdat-broken-members.yaml
    M llvm/test/tools/yaml2obj/ELF/comdat-broken.yaml
    M llvm/test/tools/yaml2obj/ELF/content-array.yaml
    M llvm/test/tools/yaml2obj/ELF/custom-fill.yaml
    M llvm/test/tools/yaml2obj/ELF/custom-null-section.yaml
    M llvm/test/tools/yaml2obj/ELF/duplicate-section-names.yaml
    M llvm/test/tools/yaml2obj/ELF/duplicate-symbol-names.yaml
    M llvm/test/tools/yaml2obj/ELF/dynamic-section-i386.yaml
    M llvm/test/tools/yaml2obj/ELF/dynamic-section-raw-content.yaml
    M llvm/test/tools/yaml2obj/ELF/dynamic-section.yaml
    M llvm/test/tools/yaml2obj/ELF/dynamic-symbols.yaml
    M llvm/test/tools/yaml2obj/ELF/dynsymtab-implicit-sections-size-content.yaml
    M llvm/test/tools/yaml2obj/ELF/dynsymtab-shlink.yaml
    M llvm/test/tools/yaml2obj/ELF/empty-symbols.yaml
    M llvm/test/tools/yaml2obj/ELF/ent-size.yaml
    M llvm/test/tools/yaml2obj/ELF/explicit-dynsym-no-dynstr.yaml
    M llvm/test/tools/yaml2obj/ELF/gnu-hash-section.yaml
    M llvm/test/tools/yaml2obj/ELF/gnu-unique-symbols.yaml
    M llvm/test/tools/yaml2obj/ELF/hash-section.yaml
    M llvm/test/tools/yaml2obj/ELF/header-elfdatanone.yaml
    M llvm/test/tools/yaml2obj/ELF/header-osabi.yaml
    M llvm/test/tools/yaml2obj/ELF/header-sh-fields.yaml
    M llvm/test/tools/yaml2obj/ELF/implicit-sections-addr.yaml
    M llvm/test/tools/yaml2obj/ELF/implicit-sections-info.yaml
    M llvm/test/tools/yaml2obj/ELF/implicit-sections-types.yaml
    M llvm/test/tools/yaml2obj/ELF/implicit-sections.yaml
    M llvm/test/tools/yaml2obj/ELF/invalid-docnum.yaml
    M llvm/test/tools/yaml2obj/ELF/linker-options.yaml
    M llvm/test/tools/yaml2obj/ELF/llvm-addrsig-section.yaml
    M llvm/test/tools/yaml2obj/ELF/llvm-deplibs-section.yaml
    M llvm/test/tools/yaml2obj/ELF/local-symbols.yaml
    M llvm/test/tools/yaml2obj/ELF/no-phdrs.yaml
    M llvm/test/tools/yaml2obj/ELF/none-value.yaml
    M llvm/test/tools/yaml2obj/ELF/note-section.yaml
    M llvm/test/tools/yaml2obj/ELF/output-limit.yaml
    M llvm/test/tools/yaml2obj/ELF/override-shflags.yaml
    M llvm/test/tools/yaml2obj/ELF/override-shname.yaml
    M llvm/test/tools/yaml2obj/ELF/override-shoffset.yaml
    M llvm/test/tools/yaml2obj/ELF/override-shsize.yaml
    M llvm/test/tools/yaml2obj/ELF/override-shtype.yaml
    M llvm/test/tools/yaml2obj/ELF/program-header-address.yaml
    M llvm/test/tools/yaml2obj/ELF/program-header-align.yaml
    M llvm/test/tools/yaml2obj/ELF/program-header-nobits.yaml
    M llvm/test/tools/yaml2obj/ELF/program-header-size-offset.yaml
    M llvm/test/tools/yaml2obj/ELF/program-header.yaml
    M llvm/test/tools/yaml2obj/ELF/reloc-sec-entry-size.yaml
    M llvm/test/tools/yaml2obj/ELF/reloc-sec-info.yaml
    M llvm/test/tools/yaml2obj/ELF/relr-section.yaml
    M llvm/test/tools/yaml2obj/ELF/section-address-assign.yaml
    M llvm/test/tools/yaml2obj/ELF/section-headers-exclude.yaml
    M llvm/test/tools/yaml2obj/ELF/section-headers.yaml
    M llvm/test/tools/yaml2obj/ELF/section-link.yaml
    M llvm/test/tools/yaml2obj/ELF/section-offset.yaml
    M llvm/test/tools/yaml2obj/ELF/section-ordering.yaml
    M llvm/test/tools/yaml2obj/ELF/section-size-content.yaml
    M llvm/test/tools/yaml2obj/ELF/section-unnamed.yaml
    M llvm/test/tools/yaml2obj/ELF/sh-addralign.yaml
    M llvm/test/tools/yaml2obj/ELF/sht-symtab-shndx.yaml
    M llvm/test/tools/yaml2obj/ELF/stack-sizes.yaml
    M llvm/test/tools/yaml2obj/ELF/strtab-implicit-sections-flags.yaml
    M llvm/test/tools/yaml2obj/ELF/strtab-implicit-sections-size-content.yaml
    M llvm/test/tools/yaml2obj/ELF/symbol-binding.yaml
    M llvm/test/tools/yaml2obj/ELF/symbol-index-invalid.yaml
    M llvm/test/tools/yaml2obj/ELF/symbol-index.yaml
    M llvm/test/tools/yaml2obj/ELF/symbol-name.yaml
    M llvm/test/tools/yaml2obj/ELF/symbol-type.yaml
    M llvm/test/tools/yaml2obj/ELF/symbol-visibility.yaml
    M llvm/test/tools/yaml2obj/ELF/symbols-binding-order.yaml
    M llvm/test/tools/yaml2obj/ELF/symtab-implicit-sections-flags.yaml
    M llvm/test/tools/yaml2obj/ELF/symtab-implicit-sections-size-content.yaml
    M llvm/test/tools/yaml2obj/ELF/symtab-shlink.yaml
    M llvm/test/tools/yaml2obj/ELF/symtab-shtype.yaml
    M llvm/test/tools/yaml2obj/ELF/verdef-section.yaml
    M llvm/test/tools/yaml2obj/ELF/verneed-section.yaml
    M llvm/test/tools/yaml2obj/ELF/versym-section.yaml
    M llvm/tools/obj2yaml/elf2yaml.cpp

  Log Message:
  -----------
  [yaml2obj] - Make the 'Machine' key optional.

Currently we have to set 'Machine' to something in our
YAML descriptions. Usually we use 'EM_X86_64' for 64-bit targets
and 'EM_386' for 32-bit targets. At the same time, in fact, in most
cases our tests do not need a machine type and we can use
'EM_NONE'.

This is cleaner, because avoids the need of using a particular machine.

In this patch I've made the 'Machine' key optional (the default value,
when it is not specified is `EM_NONE`) and removed it (where possible)
from yaml2obj, obj2yaml and llvm-readobj tests.

There are few tests left where I decided not to remove it, because
I didn't want to touch CHECK lines or doing anything more complex
than a removing a "Machine: *" line and formatting lines around.

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




More information about the All-commits mailing list