[PATCH] D76684: [obj2yaml] - Refactor how we dump sections. NFCI.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 04:16:19 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.

This is a NFC splitted from D75342 <https://reviews.llvm.org/D75342>.

Previously obj2yaml never dumped a normal SHT_NULL section (i.e. when it is just zeroed)
or non-allocatable SHT_STRTAB/SHT_SYMTAB/SHT_DYNSYM sections.

This patch does not change the output, but it changes the logic so that we now dump these
sections, and them remove them later. It allows us to create and work with our internal representation
of sections, i.e. to work with the vector of Chunks, what looks cleaner.

It is used by D75342 <https://reviews.llvm.org/D75342> and also should help us to support dumping a content that does not
belong to a section (i.e. to dump some data as `Fill` chunks).


https://reviews.llvm.org/D76684

Files:
  llvm/include/llvm/ObjectYAML/ELFYAML.h
  llvm/tools/obj2yaml/elf2yaml.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76684.252261.patch
Type: text/x-patch
Size: 6807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200324/4e275947/attachment.bin>


More information about the llvm-commits mailing list