| 1 |
# RUN: yaml2obj %s -o %t |
| 2 |
# RUN: llvm-objcopy --rename-section=.test1=.test2 --rename-section=.test3=.test4 --rename-section=.test5=.test6 %t %t2 |
| 3 |
# RUN: llvm-readobj --file-headers --sections --section-data %t2 | FileCheck %s |
| 4 |
|
| 5 |
!ELF |
| 6 |
FileHeader: |
| 7 |
Class: ELFCLASS64 |
| 8 |
Data: ELFDATA2LSB |
| 9 |
Type: ET_REL |
| 10 |
Machine: EM_X86_64 |
| 11 |
Sections: |
| 12 |
- Name: .test1 |
| 13 |
Type: SHT_PROGBITS |
| 14 |
Flags: [ SHF_ALLOC ] |
| 15 |
Content: "c3c3c3c3" |
| 16 |
- Name: .test3 |
| 17 |
Type: SHT_PROGBITS |
| 18 |
Flags: [ SHF_ALLOC ] |
| 19 |
Content: "abababab" |
| 20 |
- Name: .test7 |
| 21 |
Type: SHT_PROGBITS |
| 22 |
Flags: [ SHF_ALLOC ] |
| 23 |
Content: "37373737" |
| 24 |
|
| 25 |
# CHECK: SectionHeaderCount: 6 |
| 26 |
|
| 27 |
# CHECK: Name: .test2 |
| 28 |
# CHECK: SectionData ( |
| 29 |
# CHECK-NEXT: 0000: C3C3C3C3 |
| 30 |
# CHECK-NEXT: ) |
| 31 |
# CHECK: Name: .test4 |
| 32 |
# CHECK: SectionData ( |
| 33 |
# CHECK-NEXT: 0000: ABABABAB |
| 34 |
# CHECK-NEXT: ) |
| 35 |
# CHECK: Name: .test7 |
| 36 |
# CHECK: SectionData ( |
| 37 |
# CHECK-NEXT: 0000: 37373737 |
| 38 |
# CHECK-NEXT: ) |
| 39 |
# CHECK: Name: .strtab |
| 40 |
# CHECK: Name: .shstrtab |