| 1 |
# RUN: yaml2obj %s -o %t |
| 2 |
# RUN: llvm-objcopy --strip-non-alloc --keep-section=.test --keep-section=.test3 %t %t2 |
| 3 |
# RUN: llvm-objcopy --strip-non-alloc --regex --keep-section='^.test[0-9]+$' %t %t3 |
| 4 |
# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s |
| 5 |
# RUN: llvm-readobj --file-headers --sections %t3 | FileCheck %s --check-prefix=REGEX |
| 6 |
|
| 7 |
!ELF |
| 8 |
FileHeader: |
| 9 |
Class: ELFCLASS64 |
| 10 |
Data: ELFDATA2LSB |
| 11 |
Type: ET_REL |
| 12 |
Machine: EM_X86_64 |
| 13 |
Sections: |
| 14 |
- Name: .test |
| 15 |
Type: SHT_PROGBITS |
| 16 |
Flags: [ ] |
| 17 |
- Name: .test2 |
| 18 |
Type: SHT_PROGBITS |
| 19 |
Flags: [ ] |
| 20 |
- Name: .test3 |
| 21 |
Type: SHT_PROGBITS |
| 22 |
Flags: [ ] |
| 23 |
|
| 24 |
|
| 25 |
# CHECK: SectionHeaderCount: 4 |
| 26 |
|
| 27 |
# CHECK: Name: .test |
| 28 |
# CHECK: Name: .test3 |
| 29 |
# CHECK: Name: .shstrtab |
| 30 |
|
| 31 |
# REGEX: SectionHeaderCount: 4 |
| 32 |
# REGEX: Name: .test2 |
| 33 |
# REGEX: Name: .test3 |
| 34 |
# REGEX: Name: .shstrtab |