30 lines · plain
1## --add-section is handled before --rename-section. Note: GNU objcopy produces .foo2.2# RUN: yaml2obj %s -o %t3# RUN: llvm-objcopy --rename-section=.foo1=.foo2 --add-section=.foo1=/dev/null %t %t.14# RUN: llvm-readobj -S %t.1 | FileCheck %s5 6# CHECK: Name: .foo27# CHECK-NEXT: Type: SHT_PROGBITS8# CHECK-NEXT: Flags [9# CHECK-NEXT: ]10 11## --update-section is handled before --rename-section.12# RUN: echo 00 > %t.nop13# RUN: llvm-objcopy --rename-section=.text=.text2 --update-section=.text=%t.nop %t %t.214# RUN: llvm-readelf -x .text2 %t.2 | FileCheck %s --check-prefix=CHECK215 16# CHECK2: Hex dump of section '.text2':17# CHECK2-NEXT: 0x00000000 30300a18 19!ELF20FileHeader:21 Class: ELFCLASS6422 Data: ELFDATA2LSB23 Type: ET_REL24 Machine: EM_X86_6425Sections:26 - Name: .text27 Type: SHT_PROGBITS28 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]29 Content: "c3c3c3"30