1 ## For implicit symbol table sections, the `Flags` field can also
2 ## be specified in YAML. Here we test the behavior in different cases.
4 ## When flags are not explicitly specified, yaml2obj assigns no flags
5 ## for .symtab and the SHF_ALLOC flag for .dynsym by default.
7 # RUN: yaml2obj --docnum=1 %s -o %t1
8 # RUN: llvm-readobj %t1 -S | FileCheck %s --check-prefix=CASE1
10 # CASE1: Name: .symtab
11 # CASE1-NEXT: Type: SHT_SYMTAB
14 # CASE1: Name: .dynsym
15 # CASE1-NEXT: Type: SHT_DYNSYM
17 # CASE1-NEXT: SHF_ALLOC
31 ## Check we can set arbitrary flags for .symtab/.dynsym.
33 # RUN: yaml2obj --docnum=2 %s -o %t2
34 # RUN: llvm-readobj %t2 -S | FileCheck %s --check-prefix=CASE2
36 # CASE2: Name: .symtab
37 # CASE2-NEXT: Type: SHT_SYMTAB
39 # CASE2-NEXT: SHF_ALLOC
40 # CASE2-NEXT: SHF_STRINGS
42 # CASE2: Name: .dynsym
43 # CASE2-NEXT: Type: SHT_DYNSYM
45 # CASE2-NEXT: SHF_STRINGS
56 Flags: [ SHF_ALLOC, SHF_STRINGS ]
59 Flags: [ SHF_STRINGS ]
61 ## Check no flags are set by default for .symtab when it is not
62 ## described in the YAML.
64 # RUN: yaml2obj --docnum=3 %s -o %t3
65 # RUN: llvm-readobj %t3 -S | FileCheck %s --check-prefix=CASE3
67 # CASE3: Name: .symtab
68 # CASE3-NEXT: Type: SHT_SYMTAB