1 ## Check how we dump arch specific ELF section flags.
3 # RUN: yaml2obj --docnum 1 %s -o %t-hex.o
4 # RUN: llvm-readobj -S %t-hex.o | FileCheck --check-prefix=HEX-LLVM %s
5 # RUN: llvm-readelf -S %t-hex.o | FileCheck --check-prefix=HEX-GNU %s
7 # HEX-LLVM: Flags [ (0x10000000)
8 # HEX-LLVM-NEXT: SHF_HEX_GPREL (0x10000000)
11 # HEX-GNU: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
12 # HEX-GNU: [ 1] .hex PROGBITS 00000000 000034 000000 00 p 0 0 0
23 Flags: [ SHF_HEX_GPREL ]
25 # RUN: yaml2obj --docnum 2 %s -o %t-mips.o
26 # RUN: llvm-readobj -S %t-mips.o | FileCheck --check-prefix=MIPS-LLVM %s
27 # RUN: llvm-readelf -S %t-mips.o | FileCheck --check-prefix=MIPS-GNU %s
29 # MIPS-GNU: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
30 # MIPS-GNU: [ 1] .mips PROGBITS 00000000 000034 000000 00 op 0 0 0
32 # MIPS-LLVM: Flags [ (0xFF000000)
33 # MIPS-LLVM-NEXT: SHF_EXCLUDE (0x80000000)
34 # MIPS-LLVM-NEXT: SHF_MIPS_ADDR (0x40000000)
35 # MIPS-LLVM-NEXT: SHF_MIPS_GPREL (0x10000000)
36 # MIPS-LLVM-NEXT: SHF_MIPS_LOCAL (0x4000000)
37 # MIPS-LLVM-NEXT: SHF_MIPS_MERGE (0x20000000)
38 # MIPS-LLVM-NEXT: SHF_MIPS_NAMES (0x2000000)
39 # MIPS-LLVM-NEXT: SHF_MIPS_NODUPES (0x1000000)
40 # MIPS-LLVM-NEXT: SHF_MIPS_NOSTRIP (0x8000000)
41 # MIPS-LLVM-NEXT: SHF_MIPS_STRING (0x80000000)
53 Flags: [ SHF_MIPS_NODUPES, SHF_MIPS_NAMES, SHF_MIPS_LOCAL, SHF_MIPS_NOSTRIP,
54 SHF_MIPS_GPREL, SHF_MIPS_MERGE, SHF_MIPS_ADDR, SHF_MIPS_STRING ]
56 ## Test what we print when a MIPS object has the SHF_MIPS_STRING flag.
57 ## SHF_MIPS_STRING has a value of 0x80000000, which matches the value of SHF_EXCLUDE.
59 # RUN: yaml2obj --docnum 3 %s -o %t-mips-exclude.o
60 # RUN: llvm-readobj -S %t-mips-exclude.o | FileCheck --check-prefix=MIPS-EXCLUDE-LLVM %s
61 # RUN: llvm-readelf -S %t-mips-exclude.o | FileCheck --check-prefix=MIPS-EXCLUDE-GNU %s
63 # MIPS-EXCLUDE-LLVM: Name: .mips
64 # MIPS-EXCLUDE-LLVM-NEXT: Type: SHT_PROGBITS
65 # MIPS-EXCLUDE-LLVM-NEXT: Flags [ (0x80000000)
66 # MIPS-EXCLUDE-LLVM-NEXT: SHF_EXCLUDE (0x80000000)
67 # MIPS-EXCLUDE-LLVM-NEXT: SHF_MIPS_STRING (0x80000000)
68 # MIPS-EXCLUDE-LLVM-NEXT: ]
70 # MIPS-EXCLUDE-GNU: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
71 # MIPS-EXCLUDE-GNU: [ 1] .mips PROGBITS 00000000 000034 000000 00 E 0 0 0
82 Flags: [ SHF_MIPS_STRING ]
84 # RUN: yaml2obj --docnum 4 %s -o %t-x86_64.o
85 # RUN: llvm-readobj -S %t-x86_64.o | FileCheck --check-prefix=X86_64-LLVM %s
86 # RUN: llvm-readelf -S %t-x86_64.o | FileCheck --check-prefix=X86_64-GNU %s
88 # X86_64-LLVM: Name: .x86_64
89 # X86_64-LLVM-NEXT: Type: SHT_PROGBITS
90 # X86_64-LLVM-NEXT: Flags [ (0x10000000)
91 # X86_64-LLVM-NEXT: SHF_X86_64_LARGE (0x10000000)
94 # X86_64-LLVM: Name: .with.exclude
95 # X86_64-LLVM-NEXT: Type: SHT_PROGBITS
96 # X86_64-LLVM-NEXT: Flags [ (0x90000000)
97 # X86_64-LLVM-NEXT: SHF_EXCLUDE (0x80000000)
98 # X86_64-LLVM-NEXT: SHF_X86_64_LARGE (0x10000000)
101 ## GNU prints 'l' before 'E', despite otherwise printing upper-case letters first.
102 # X86_64-GNU: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
103 # X86_64-GNU: [ 1] .x86_64 PROGBITS 0000000000000000 000040 000000 00 l 0 0 0
104 # X86_64-GNU: [ 2] .with.exclude PROGBITS 0000000000000000 000040 000000 00 lE 0 0 0
115 Flags: [ SHF_X86_64_LARGE ]
116 - Name: .with.exclude
118 Flags: [ SHF_X86_64_LARGE, SHF_EXCLUDE ]
120 # RUN: yaml2obj --docnum 5 %s -o %t-arm.o
121 # RUN: llvm-readobj -S %t-arm.o | FileCheck --check-prefix=ARM-LLVM %s
122 # RUN: llvm-readelf -S %t-arm.o | FileCheck --check-prefix=ARM-GNU %s
124 # ARM-LLVM: Flags [ (0x20000000)
125 # ARM-LLVM-NEXT: SHF_ARM_PURECODE (0x20000000)
128 # ARM-GNU: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
129 # ARM-GNU: [ 1] foo PROGBITS 0000000000000000 000040 000000 00 y 0 0 0
140 Flags: [ SHF_ARM_PURECODE ]