[PATCH] D74955: [obj2yaml] - Dump SHT_STRTAB, SHT_SYMTAB and SHT_DYNSYM sections.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 21 04:35:38 PST 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added a project: LLVM.
Sometimes we need to dump an object and build it again from a YAML
description produced. The problem is that obj2yaml does not dump some
of sections, like string tables and symbol tables.
Because of that yaml2obj implicitly creates them and sections created
are not placed at their original locations. They are added to the end of a section list.
That makes a preparing test cases task harder than it can be.
In this patch I suggest to dump parts of SHT_STRTAB, SHT_SYMTAB and SHT_DYNSYM sections
to print placeholders for them. This also allows to preserve usefull parameters, like VA.
https://reviews.llvm.org/D74955
Files:
llvm/test/Object/obj2yaml.test
llvm/test/tools/obj2yaml/call-graph-profile-section.yaml
llvm/test/tools/obj2yaml/duplicate-symbol-and-section-names.test
llvm/test/tools/obj2yaml/elf-gnu-unique-symbols.yaml
llvm/test/tools/obj2yaml/elf-no-symtab.yaml
llvm/test/tools/obj2yaml/elf-null-section.yaml
llvm/test/tools/obj2yaml/elf-sht-symtab-shndx.yaml
llvm/test/tools/obj2yaml/elf-symbol-visibility.yaml
llvm/test/tools/obj2yaml/implicit-sections-order.yaml
llvm/test/tools/obj2yaml/invalid-section-name.yaml
llvm/test/tools/obj2yaml/no-symbol-reloc.test
llvm/test/tools/obj2yaml/versym-section.yaml
llvm/tools/obj2yaml/elf2yaml.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74955.245814.patch
Type: text/x-patch
Size: 17030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200221/694b2a45/attachment.bin>
More information about the llvm-commits
mailing list