[PATCH] D89039: [yaml2obj/obj2yaml] - Add support of 'Size' and 'Content' keys for all sections.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 06:10:10 PDT 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: atanasyan, hiraditya, arichardson, sdardis, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar requested review of this revision.
Many sections either do not have a support of `Size`/`Content` or support just a
one of them, e.g only `Content`.
`Section` is the base class for sections. This patch adds `Content` and `Size` members
to it and removes similar members from derived classes. This allows to cleanup and
generalize the code and adds a support of these keys for all sections (`SHT_MIPS_ABIFLAGS`
is a only exception, it requires an unrelated specific changes to be done additionally).
I had to update/add many tests to test the new functionality properly.
https://reviews.llvm.org/D89039
Files:
llvm/include/llvm/ObjectYAML/ELFYAML.h
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/yaml2obj/ELF/arm-exidx-section.yaml
llvm/test/tools/yaml2obj/ELF/call-graph-profile-section.yaml
llvm/test/tools/yaml2obj/ELF/comdat.yaml
llvm/test/tools/yaml2obj/ELF/dynamic-section-raw-content.yaml
llvm/test/tools/yaml2obj/ELF/gnu-hash-section.yaml
llvm/test/tools/yaml2obj/ELF/hash-section.yaml
llvm/test/tools/yaml2obj/ELF/linker-options.yaml
llvm/test/tools/yaml2obj/ELF/llvm-addrsig-section.yaml
llvm/test/tools/yaml2obj/ELF/llvm-deplibs-section.yaml
llvm/test/tools/yaml2obj/ELF/mips-abi-flags.yaml
llvm/test/tools/yaml2obj/ELF/nobits.yaml
llvm/test/tools/yaml2obj/ELF/note-section.yaml
llvm/test/tools/yaml2obj/ELF/reloc-sec.yaml
llvm/test/tools/yaml2obj/ELF/relr-section.yaml
llvm/test/tools/yaml2obj/ELF/sht-symtab-shndx.yaml
llvm/test/tools/yaml2obj/ELF/stack-sizes.yaml
llvm/test/tools/yaml2obj/ELF/verdef-section.yaml
llvm/test/tools/yaml2obj/ELF/verneed-section.yaml
llvm/test/tools/yaml2obj/ELF/versym-section.yaml
llvm/tools/obj2yaml/elf2yaml.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89039.296940.patch
Type: text/x-patch
Size: 87123 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201008/3123c5c1/attachment.bin>
More information about the llvm-commits
mailing list