Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-objcopy / COFF / add-section-and-set-flags.test
blobb5fdcb8f6624f51506c9c96cbfe33daf280ceacf
1 # RUN: yaml2obj %s -o %t
3 ## Test that llvm-objcopy can add sections and set its flags in the same
4 ## call.
5 # RUN: echo DEADBEEF > %t.sec
6 # RUN: llvm-objcopy --set-section-flags=.test.section1=code --add-section=.test.section1=%t.sec --set-section-flags=.test.section2=data --add-section=.test.section2=%t.sec %t %t1
7 # RUN: llvm-readobj --sections --section-data %t1 | FileCheck %s
9 # CHECK:       Name: .test.section1
10 # CHECK-NEXT:  VirtualSize: 0x9
11 # CHECK-NEXT:  VirtualAddress: 0x0
12 # CHECK-NEXT:  RawDataSize: 9
13 # CHECK:       Characteristics [
14 # CHECK-NEXT:      IMAGE_SCN_CNT_CODE
15 # CHECK-NEXT:      IMAGE_SCN_MEM_EXECUTE
16 # CHECK-NEXT:      IMAGE_SCN_MEM_READ
17 # CHECK-NEXT:      IMAGE_SCN_MEM_WRITE
18 # CHECK-NEXT:  ]
20 # CHECK:       Name: .test.section2
21 # CHECK-NEXT:  VirtualSize: 0x9
22 # CHECK-NEXT:  VirtualAddress: 0x9
23 # CHECK-NEXT:  RawDataSize: 9
24 # CHECK:       Characteristics [
25 # CHECK-NEXT:    IMAGE_SCN_CNT_INITIALIZED_DATA
26 # CHECK-NEXT:    IMAGE_SCN_MEM_READ
27 # CHECK-NEXT:    IMAGE_SCN_MEM_WRITE
28 # CHECK-NEXT:  ]
30 --- !COFF
31 header:
32   Machine:         IMAGE_FILE_MACHINE_AMD64
33   Characteristics: [ ]
34 sections:
35 symbols:
36 ...