[all-commits] [llvm/llvm-project] 5829dc: [yaml2obj][elf2yaml] - Add a support for the `EntS...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Fri Oct 2 02:09:42 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5829dc925002aaf5e80189924e59d238d3d2a4d1
      https://github.com/llvm/llvm-project/commit/5829dc925002aaf5e80189924e59d238d3d2a4d1
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2020-10-02 (Fri, 02 Oct 2020)

  Changed paths:
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/test/tools/obj2yaml/ELF/hash-section.yaml
    M llvm/test/tools/yaml2obj/ELF/hash-section.yaml
    M llvm/test/tools/yaml2obj/ELF/section-headers-exclude.yaml
    M llvm/tools/obj2yaml/elf2yaml.cpp

  Log Message:
  -----------
  [yaml2obj][elf2yaml] - Add a support for the `EntSize` field for `SHT_HASH` sections.

Specification  for SHT_HASH table says (https://refspecs.linuxbase.org/elf/gabi4+/ch5.dynamic.html#hash)
that it contains Elf32_Word entries for both 32/64 bit objects.

Currently both GNU linkers and LLD sets the `sh_entsize` field to `4`.

At the same time, `yaml2obj` ignores the `EntSize` field for SHT_HASH sections.
This patch fixes this and also adds a support for obj2yaml: it will not
dump this field when the `sh_entsize` contains the default value (`4`).

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




More information about the All-commits mailing list