[all-commits] [llvm/llvm-project] aefec9: [obj2yaml] - Refactor how we dump sections. NFCI.

Georgii Rymar via All-commits all-commits at lists.llvm.org
Thu Mar 26 04:04:25 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: aefec9ed77f63db832b1235d427b439c04759873
      https://github.com/llvm/llvm-project/commit/aefec9ed77f63db832b1235d427b439c04759873
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M llvm/include/llvm/ObjectYAML/ELFYAML.h
    M llvm/tools/obj2yaml/elf2yaml.cpp

  Log Message:
  -----------
  [obj2yaml] - Refactor how we dump sections. NFCI.

This is a NFC splitted from 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 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).

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




More information about the All-commits mailing list