1 # Test that cpu/processor-specific SHF_* flags are preserved,
2 # except SHF_X86_64_LARGE on x86_64 (which is controlled with the
7 # RUN: yaml2obj --docnum=1 %s -o %t-x86_64.o
8 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-x86_64.o
9 # RUN: llvm-readobj --sections %t-x86_64.o | FileCheck %s --check-prefix=X86_64
10 # RUN: llvm-objcopy --rename-section=.bar=.quz,alloc,large %t-x86_64.o
11 # RUN: llvm-readobj --sections %t-x86_64.o | FileCheck %s --check-prefix=X86_64-LARGE
22 Flags: [ SHF_X86_64_LARGE ]
25 # X86_64-NEXT: Type: SHT_PROGBITS
26 # X86_64-NEXT: Flags [
27 # X86_64-NEXT: SHF_ALLOC (0x2)
28 # X86_64-NEXT: SHF_WRITE (0x1)
31 # X86_64-LARGE: Name: .quz
32 # X86_64-LARGE-NEXT: Type: SHT_PROGBITS
33 # X86_64-LARGE-NEXT: Flags [
34 # X86_64-LARGE-NEXT: SHF_ALLOC (0x2)
35 # X86_64-LARGE-NEXT: SHF_WRITE (0x1)
36 # X86_64-LARGE-NEXT: SHF_X86_64_LARGE (0x10000000)
37 # X86_64-LARGE-NEXT: ]
41 # RUN: yaml2obj --docnum=2 %s -o %t-hex.o
42 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-hex.o
43 # RUN: llvm-readobj --sections %t-hex.o | FileCheck %s --check-prefix=HEX
54 Flags: [ SHF_HEX_GPREL ]
57 # HEX-NEXT: Type: SHT_PROGBITS
59 # HEX-NEXT: SHF_ALLOC (0x2)
60 # HEX-NEXT: SHF_HEX_GPREL (0x10000000)
61 # HEX-NEXT: SHF_WRITE (0x1)
66 # RUN: yaml2obj --docnum=3 %s -o %t-mips.o
67 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-mips.o
68 # RUN: llvm-readobj --sections %t-mips.o | FileCheck %s --check-prefix=MIPS
79 Flags: [ SHF_MIPS_NODUPES, SHF_MIPS_NAMES, SHF_MIPS_LOCAL,
80 SHF_MIPS_NOSTRIP, SHF_MIPS_GPREL, SHF_MIPS_MERGE,
81 SHF_MIPS_ADDR, SHF_MIPS_STRING ]
83 # Note: llvm-readobj prints SHF_EXCLUDE/SHF_MASKPROC since specifying all
84 # SHF_MIPS_* flags covers the same bitset.
87 # MIPS-NEXT: Type: SHT_PROGBITS
89 # MIPS-NEXT: SHF_ALLOC (0x2)
90 # MIPS-NEXT: SHF_MIPS_ADDR (0x40000000)
91 # MIPS-NEXT: SHF_MIPS_GPREL (0x10000000)
92 # MIPS-NEXT: SHF_MIPS_LOCAL (0x4000000)
93 # MIPS-NEXT: SHF_MIPS_MERGE (0x20000000)
94 # MIPS-NEXT: SHF_MIPS_NAMES (0x2000000)
95 # MIPS-NEXT: SHF_MIPS_NODUPES (0x1000000)
96 # MIPS-NEXT: SHF_MIPS_NOSTRIP (0x8000000)
97 # MIPS-NEXT: SHF_WRITE (0x1)
102 # RUN: yaml2obj --docnum=4 %s -o %t-arm.o
103 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-arm.o
104 # RUN: llvm-readobj --sections %t-arm.o | FileCheck %s --check-prefix=ARM
115 Flags: [ SHF_ARM_PURECODE ]
118 # ARM-NEXT: Type: SHT_PROGBITS
120 # ARM-NEXT: SHF_ALLOC (0x2)
121 # ARM-NEXT: SHF_ARM_PURECODE (0x20000000)
122 # ARM-NEXT: SHF_WRITE (0x1)