[all-commits] [llvm/llvm-project] daff7b: [yaml2obj] - Make DynamicSymbols to be Optional<> ...

Georgii Rymar via All-commits all-commits at lists.llvm.org
Wed Dec 4 02:12:31 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: daff7b85890b31085f75b8e9694e074745518069
      https://github.com/llvm/llvm-project/commit/daff7b85890b31085f75b8e9694e074745518069
  Author: Georgii Rymar <grimar at accesssoftek.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M llvm/include/llvm/ObjectYAML/ELFYAML.h
    M llvm/lib/ObjectYAML/ELFEmitter.cpp
    M llvm/test/tools/yaml2obj/ELF/dynsymtab-implicit-sections-size-content.yaml
    M llvm/test/tools/yaml2obj/ELF/gnu-hash-section.yaml
    M llvm/test/tools/yaml2obj/ELF/implicit-sections-addr.yaml
    M llvm/test/tools/yaml2obj/ELF/implicit-sections-types.yaml
    M llvm/test/tools/yaml2obj/ELF/implicit-sections.yaml
    M llvm/test/tools/yaml2obj/ELF/symtab-implicit-sections-size-content.yaml
    M llvm/tools/obj2yaml/elf2yaml.cpp

  Log Message:
  -----------
  [yaml2obj] - Make DynamicSymbols to be Optional<> too.

We already have Symbols property to list regular symbols and
it is currently Optional<>. This patch makes DynamicSymbols to be optional
too. With this there is no need to define a dummy symbol anymore to trigger
creation of the .dynsym and it is now possible to define an empty .dynsym using
just the following line:

DynamicSymbols: []
(it is important to have when you do not want to have dynamic symbols,
but want to have a .dynsym)

Now the code is consistent and it helped to fix a bug: previously we
did not report an error when both Content/Size and an empty
Symbols/DynamicSymbols list were specified.

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




More information about the All-commits mailing list