1 ## --add-section is handled before --rename-section. Note: GNU objcopy produces .foo2.
2 # RUN: yaml2obj %s -o %t
3 # RUN: llvm-objcopy --rename-section=.foo1=.foo2 --add-section=.foo1=/dev/null %t %t.1
4 # RUN: llvm-readobj -S %t.1 | FileCheck %s
7 # CHECK-NEXT: Type: SHT_PROGBITS
11 ## --update-section is handled before --rename-section.
12 # RUN: echo 00 > %t.nop
13 # RUN: llvm-objcopy --rename-section=.text=.text2 --update-section=.text=%t.nop %t %t.2
14 # RUN: llvm-readelf -x .text2 %t.2 | FileCheck %s --check-prefix=CHECK2
16 # CHECK2: Hex dump of section '.text2':
17 # CHECK2-NEXT: 0x00000000 30300a
28 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]