1 # RUN: yaml2obj %s > %t 2 # RUN: llvm-objcopy --rename-section=.foo=.bar %t %t2 3 # RUN: llvm-readobj -file-headers -sections -section-data %t2 | FileCheck %s 4 # RUN: not llvm-objcopy --rename-section=.foo.bar --rename-section=.foo=.other %t %t2 2>&1 | FileCheck %s --check-prefix=BAD-FORMAT 5 # RUN: not llvm-objcopy --rename-section=.foo=.bar --rename-section=.foo=.other %t %t2 2>&1 | FileCheck %s --check-prefix=MULTIPLE-RENAMES 6 7 !ELF 8 FileHeader: 9 Class: ELFCLASS64 10 Data: ELFDATA2LSB 11 Type: ET_REL 12 Machine: EM_X86_64 13 Sections: 14 - Name: .foo 15 Type: SHT_PROGBITS 16 Flags: [ SHF_ALLOC ] 17 Content: "c3c3c3c3" 18 19 # CHECK: SectionHeaderCount: 5 20 21 # CHECK: Name: .bar 22 # CHECK: SectionData ( 23 # CHECK-NEXT: 0000: C3C3C3C3 24 # CHECK-NEXT: ) 25 # CHECK: Name: .symtab 26 # CHECK: Name: .strtab 27 # CHECK: Name: .shstrtab 28 29 #BAD-FORMAT: Bad format for --rename-section 30 #MULTIPLE-RENAMES: Already have a section rename for .foo 31