blob: 0dee1182a28d9ac4e353c5474b60a6bea5679049 [file] [log] [blame]
Jake Ehrliche8437de2017-12-19 00:47:30 +00001# RUN: yaml2obj %s > %t
2# RUN: echo 0000 > %t.sec
3# RUN: llvm-objcopy -R=.test2 -add-section=.test2=%t.sec %t %t2
4# RUN: llvm-readobj -file-headers -sections -section-data %t2 | FileCheck %s
5
6!ELF
7FileHeader:
8 Class: ELFCLASS64
9 Data: ELFDATA2LSB
10 Type: ET_REL
11 Machine: EM_X86_64
12Sections:
13 - Name: .test1
14 Type: SHT_PROGBITS
15 Flags: [ SHF_ALLOC ]
16 Content: "c3c3c3c3"
17 - Name: .test2
18 Type: SHT_PROGBITS
19 Flags: [ SHF_ALLOC ]
20 Content: "DEADBEEF"
21 - Name: .test3
22 Type: SHT_PROGBITS
23 Flags: [ SHF_ALLOC ]
24 Content: "32323232"
25
26# CHECK: SectionHeaderCount: 7
27
28# CHECK: Name: .test1
29# CHECK: Name: .test3
30# CHECK: Name: .symtab
31# CHECK: Name: .strtab
32# CHECK: Name: .shstrtab
33# CHECK: Name: .test2
34# CHECK: SectionData (
35# CHECK-NEXT: 0000: 30303030
36# CHECK-NEXT: )