1 # RUN: yaml2obj %s > %t
3 # Single flags on a section with all flags:
4 # RUN: llvm-objcopy --rename-section=.foo=.bar,alloc %t %t.alloc
5 # RUN: llvm-readobj --sections %t.alloc | FileCheck %s --check-prefixes=CHECK,ALLOC,WRITE
6 # RUN: llvm-objcopy --rename-section=.foo=.bar,load %t %t.load
7 # RUN: llvm-readobj --sections %t.load | FileCheck %s --check-prefixes=CHECK,WRITE
8 # RUN: llvm-objcopy --rename-section=.foo=.bar,noload %t %t.noload
9 # RUN: llvm-readobj --sections %t.noload | FileCheck %s --check-prefixes=CHECK,WRITE
10 # RUN: llvm-objcopy --rename-section=.foo=.bar,readonly %t %t.readonly
11 # RUN: llvm-readobj --sections %t.readonly | FileCheck %s --check-prefixes=CHECK
12 # RUN: llvm-objcopy --rename-section=.foo=.bar,debug %t %t.debug
13 # RUN: llvm-readobj --sections %t.debug | FileCheck %s --check-prefixes=CHECK,WRITE
14 # RUN: llvm-objcopy --rename-section=.foo=.bar,code %t %t.code
15 # RUN: llvm-readobj --sections %t.code | FileCheck %s --check-prefixes=CHECK,EXEC,WRITE
16 # RUN: llvm-objcopy --rename-section=.foo=.bar,data %t %t.data
17 # RUN: llvm-readobj --sections %t.data | FileCheck %s --check-prefixes=CHECK,WRITE
18 # RUN: llvm-objcopy --rename-section=.foo=.bar,rom %t %t.rom
19 # RUN: llvm-readobj --sections %t.rom | FileCheck %s --check-prefixes=CHECK,WRITE
20 # RUN: llvm-objcopy --rename-section=.foo=.bar,contents %t %t.contents
21 # RUN: llvm-readobj --sections %t.contents | FileCheck %s --check-prefixes=CHECK,WRITE
22 # RUN: llvm-objcopy --rename-section=.foo=.bar,merge %t %t.merge
23 # RUN: llvm-readobj --sections %t.merge | FileCheck %s --check-prefixes=CHECK,MERGE,WRITE
24 # RUN: llvm-objcopy --rename-section=.foo=.bar,strings %t %t.strings
25 # RUN: llvm-readobj --sections %t.strings | FileCheck %s --check-prefixes=CHECK,STRINGS,WRITE
26 # RUN: llvm-objcopy --rename-section=.foo=.bar,share %t %t.share
27 # RUN: llvm-readobj --sections %t.share | FileCheck %s --check-prefixes=CHECK,WRITE
44 - SectionOrType: GRP_COMDAT
49 Flags: [ SHF_ALLOC, SHF_COMPRESSED, SHF_EXCLUDE, SHF_EXECINSTR,
50 SHF_GROUP, SHF_INFO_LINK, SHF_LINK_ORDER, SHF_MERGE,
51 SHF_OS_NONCONFORMING, SHF_STRINGS, SHF_TLS, SHF_WRITE ]
58 # CHECK-NEXT: Type: SHT_PROGBITS
60 # ALLOC-NEXT: SHF_ALLOC (0x2)
61 # CHECK-NEXT: SHF_COMPRESSED (0x800)
62 # CHECK-NEXT: SHF_EXCLUDE (0x80000000)
63 # EXEC-NEXT: SHF_EXECINSTR (0x4)
64 # CHECK-NEXT: SHF_GROUP (0x200)
65 # CHECK-NEXT: SHF_INFO_LINK (0x40)
66 # CHECK-NEXT: SHF_LINK_ORDER (0x80)
67 # MERGE-NEXT: SHF_MERGE (0x10)
68 # STRINGS-NEXT: SHF_STRINGS (0x20)
69 # CHECK-NEXT: SHF_TLS (0x400)
70 # WRITE-NEXT: SHF_WRITE (0x1)
73 # BAD-FLAG: unrecognized section flag 'xyzzy'