Debian Codegraph @

llvm/test/tools/llvm-objcopy/ELF/rename-section-empty-string.test

raw
1 ## This test verifies that llvm-objcopy can handle renaming a section to and
2 ## from an empty string.
3 # RUN: yaml2obj %s -o %t.o
4
5 # RUN: llvm-objcopy %t.o %t2.o --rename-section=.foo=
6 # RUN: llvm-readobj --sections %t2.o | FileCheck %s --check-prefix=TO
7
8 # RUN: llvm-objcopy %t2.o %t3.o --rename-section==.bar
9 # RUN: llvm-readobj --sections %t3.o | FileCheck %s --check-prefix=FROM
10
11 --- !ELF
12 FileHeader:
13 Class: ELFCLASS64
14 Data: ELFDATA2LSB
15 Type: ET_REL
16 Machine: EM_X86_64
17 Sections:
18 - Name: .foo
19 Type: SHT_PROGBITS
20
21 # TO: Index: 1
22 # TO-NEXT: Name: (0)
23 # FROM: Index: 1
24 # FROM-NEXT: Name: .bar (