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
32 ## Check we can set arbitrary flags for .symtab/.dynsym.
34 # RUN: yaml2obj --docnum=2 %s -o %t2
35 # RUN: llvm-readobj %t2 -S | FileCheck %s --check-prefix=CASE2
37 # CASE2: Name: .symtab
38 # CASE2-NEXT: Type: SHT_SYMTAB
40 # CASE2-NEXT: SHF_ALLOC
41 # CASE2-NEXT: SHF_STRINGS
43 # CASE2: Name: .dynsym
44 # CASE2-NEXT: Type: SHT_DYNSYM
46 # CASE2-NEXT: SHF_STRINGS
58 Flags: [ SHF_ALLOC, SHF_STRINGS ]
61 Flags: [ SHF_STRINGS ]
63 ## Check no flags are set by default for .symtab when it is not
64 ## described in the YAML.
66 # RUN: yaml2obj --docnum=3 %s -o %t3
67 # RUN: llvm-readobj %t3 -S | FileCheck %s --check-prefix=CASE3
69 # CASE3: Name: .symtab
70 # CASE3-NEXT: Type: SHT_SYMTAB