With this patch we get ability to set any flags we want
for implicit sections defined in YAML.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Do we have test cases anywhere for the sections' flags when they aren't described in the YAML?
| test/tools/yaml2obj/strtab-implicit-sections-flags.yaml | ||
|---|---|---|
| 1 ↗ | (On Diff #204055) | Nit: add "the" before Flags. | 
| 5 ↗ | (On Diff #204055) | and -> and the | 
| 32–33 ↗ | (On Diff #204055) | I'd probably just remove the rest of the sentence from "and make .strtab ..." | 
| test/tools/yaml2obj/symtab-implicit-sections-flags.yaml | ||
| 1 ↗ | (On Diff #204055) | Same comments apply to this test as the other test. | 
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.yamlThe 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.yamlIn 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.