[PATCH] D63136: [yaml2obj] - Allow setting cutom Flags for implicit sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 03:20:28 PDT 2019


grimar added a comment.

In D63136#1538159 <https://reviews.llvm.org/D63136#1538159>, @jhenderson wrote:

> Do we have test cases anywhere for the sections' flags when they aren't described in the YAML?


When I stop adding `SHF_ALLOC` flag for `.dynsym/.dynstr` and run the tests, I see 6 are failing:

  Failing Tests (6):
      LLVM :: tools/yaml2obj/dynamic-symbols.yaml
      LLVM :: tools/yaml2obj/dynsymtab-implicit-sections-size-content.yaml
      LLVM :: tools/yaml2obj/elf-symtab-shinfo.yaml
      LLVM :: tools/yaml2obj/explicit-dynsym-no-dynstr.yaml
      LLVM :: tools/yaml2obj/strtab-implicit-sections-flags.yaml
      LLVM :: tools/yaml2obj/symtab-implicit-sections-flags.yaml

The first 4 are intended to check different things and the last 2 are added by this patch.
**`dynamic-symbols.yaml` checks that .dynsym/.dynstr has SHF_ALLOC when they are not described in it's YAML explicitly.**

If I start adding `SHF_ALLOC` for `.strtab/.symtab` (in case their flags are not described explicitly)
then the following tests are failing:

  Failing Tests (5):
      LLVM :: tools/yaml2obj/elf-symtab-shinfo.yaml
      LLVM :: tools/yaml2obj/strtab-implicit-sections-flags.yaml
      LLVM :: tools/yaml2obj/strtab-implicit-sections-size-content.yaml
      LLVM :: tools/yaml2obj/symtab-implicit-sections-flags.yaml
      LLVM :: tools/yaml2obj/symtab-implicit-sections-size-content.yaml

In all of these test cases these sections are described in yaml (but flags are not). I.e. seems we never test their default 
flags when they aren't explicitly described in the YAML.

I'll update the  `strtab-implicit-sections-flags.yaml` and `symtab-implicit-sections-flags.yaml` to fix that piece.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63136/new/

https://reviews.llvm.org/D63136





More information about the llvm-commits mailing list