[all-commits] [llvm/llvm-project] d58e38: [obj2yaml] - Dump allocatable SHT_STRTAB, SHT_SYMT...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Tue Mar 3 00:33:41 PST 2020


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

  Changed paths:
    M llvm/test/tools/obj2yaml/duplicate-symbol-and-section-names.test
    A llvm/test/tools/obj2yaml/implicit-sections-order.yaml
    M llvm/test/tools/obj2yaml/versym-section.yaml
    M llvm/tools/obj2yaml/elf2yaml.cpp

  Log Message:
  -----------
  [obj2yaml] - Dump allocatable SHT_STRTAB, SHT_SYMTAB and SHT_DYNSYM sections.

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.

This patch teaches obj2yaml to dump parts of allocatable SHT_STRTAB, SHT_SYMTAB
and SHT_DYNSYM sections to print placeholders for them.
This also allows to preserve usefull parameters, like virtual address.

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




More information about the All-commits mailing list