1 # Test that cpu/processor-specific SHF_* flags are preserved.
5 # RUN: yaml2obj --docnum 1 %s > %t-x86_64.o
6 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-x86_64.o
7 # RUN: llvm-readobj --sections %t-x86_64.o | FileCheck %s --check-prefix=X86_64
18 Flags: [ SHF_X86_64_LARGE ]
21 # X86_64-NEXT: Type: SHT_PROGBITS
22 # X86_64-NEXT: Flags [
23 # X86_64-NEXT: SHF_ALLOC (0x2)
24 # X86_64-NEXT: SHF_WRITE (0x1)
25 # X86_64-NEXT: SHF_X86_64_LARGE (0x10000000)
30 # RUN: yaml2obj --docnum 2 %s > %t-hex.o
31 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-hex.o
32 # RUN: llvm-readobj --sections %t-hex.o | FileCheck %s --check-prefix=HEX
43 Flags: [ SHF_HEX_GPREL ]
46 # HEX-NEXT: Type: SHT_PROGBITS
48 # HEX-NEXT: SHF_ALLOC (0x2)
49 # HEX-NEXT: SHF_HEX_GPREL (0x10000000)
50 # HEX-NEXT: SHF_WRITE (0x1)
55 # RUN: yaml2obj --docnum 3 %s > %t-mips.o
56 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-mips.o
57 # RUN: llvm-readobj --sections %t-mips.o | FileCheck %s --check-prefix=MIPS
68 Flags: [ SHF_MIPS_NODUPES, SHF_MIPS_NAMES, SHF_MIPS_LOCAL,
69 SHF_MIPS_NOSTRIP, SHF_MIPS_GPREL, SHF_MIPS_MERGE,
70 SHF_MIPS_ADDR, SHF_MIPS_STRING ]
72 # Note: llvm-readobj prints SHF_EXCLUDE/SHF_MASKPROC since specifying all
73 # SHF_MIPS_* flags covers the same bitset.
76 # MIPS-NEXT: Type: SHT_PROGBITS
78 # MIPS-NEXT: SHF_ALLOC (0x2)
79 # MIPS-NEXT: SHF_EXCLUDE (0x80000000)
80 # MIPS-NEXT: SHF_MASKPROC (0xF0000000)
81 # MIPS-NEXT: SHF_MIPS_ADDR (0x40000000)
82 # MIPS-NEXT: SHF_MIPS_GPREL (0x10000000)
83 # MIPS-NEXT: SHF_MIPS_LOCAL (0x4000000)
84 # MIPS-NEXT: SHF_MIPS_MERGE (0x20000000)
85 # MIPS-NEXT: SHF_MIPS_NAMES (0x2000000)
86 # MIPS-NEXT: SHF_MIPS_NODUPES (0x1000000)
87 # MIPS-NEXT: SHF_MIPS_NOSTRIP (0x8000000)
88 # MIPS-NEXT: SHF_MIPS_STRING (0x80000000)
89 # MIPS-NEXT: SHF_WRITE (0x1)
94 # RUN: yaml2obj --docnum 4 %s > %t-arm.o
95 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t-arm.o
96 # RUN: llvm-readobj --sections %t-arm.o | FileCheck %s --check-prefix=ARM
107 Flags: [ SHF_ARM_PURECODE ]
110 # ARM-NEXT: Type: SHT_PROGBITS
112 # ARM-NEXT: SHF_ALLOC (0x2)
113 # ARM-NEXT: SHF_ARM_PURECODE (0x20000000)
114 # ARM-NEXT: SHF_WRITE (0x1)