1 ## Check how yaml2obj handles retain (SHF_GNU_RETAIN and
2 ## SHF_SUNW_NODISCARD) section flags.
4 # RUN: yaml2obj --docnum=1 %s -o %t1
5 # RUN: llvm-readobj --sections %t1 | FileCheck %s --check-prefix=GNU
7 # GNU: Name: .gnu.retain
8 # GNU-NEXT: Type: SHT_PROGBITS (0x1)
9 # GNU-NEXT: Flags [ (0x200000)
10 # GNU-NEXT: SHF_GNU_RETAIN (0x200000)
21 Flags: [ SHF_GNU_RETAIN ]
23 # RUN: yaml2obj --docnum=2 %s -o %t2
24 # RUN: llvm-readobj --sections %t2 | FileCheck %s --check-prefix=SOLARIS
26 # SOLARIS: Name: .sunw.nodiscard
27 # SOLARIS-NEXT: Type: SHT_PROGBITS (0x1)
28 # SOLARIS-NEXT: Flags [ (0x100000)
29 # SOLARIS-NEXT: SHF_SUNW_NODISCARD (0x100000)
36 OSABI: ELFOSABI_SOLARIS
39 - Name: .sunw.nodiscard
41 Flags: [ SHF_SUNW_NODISCARD ]
43 # RUN: not yaml2obj --docnum=3 %s 2>&1 | \
44 # RUN: FileCheck %s --check-prefix=SOLARIS-GNU-ERR
46 # SOLARIS-GNU-ERR: error: unknown bit value
47 # SOLARIS-GNU-ERR-NEXT: Flags: [ SHF_GNU_RETAIN ]
53 OSABI: ELFOSABI_SOLARIS
58 Flags: [ SHF_GNU_RETAIN ]
60 # RUN: not yaml2obj --docnum=4 %s 2>&1 | \
61 # RUN: FileCheck %s --check-prefix=GNU-SOLARIS-ERR
63 # GNU-SOLARIS-ERR: error: unknown bit value
64 # GNU-SOLARIS-ERR-NEXT: Flags: [ SHF_SUNW_NODISCARD ]
72 - Name: .gnu.nodiscard
74 Flags: [ SHF_SUNW_NODISCARD ]