1 # RUN: yaml2obj %s -o %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
7 ## Section renames don't chain:
8 # RUN: llvm-objcopy --rename-section=.foo=.bar --rename-section=.bar=.baz %t %t3
23 # CHECK: SectionHeaderCount: 4
26 # CHECK: SectionData (
27 # CHECK-NEXT: 0000: C3C3C3C3
29 # CHECK: Name: .strtab
30 # CHECK: Name: .shstrtab
32 #BAD-FORMAT: bad format for --rename-section: missing '='
33 #MULTIPLE-RENAMES: multiple renames of section '.foo'