1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
| ## Check we are able to set a custom sh_name field for different sections
## and that doing this does not affect the names stored in the string table.
# RUN: yaml2obj %s -o %t1
# RUN: llvm-readobj --sections --section-data %t1 | FileCheck %s
# CHECK: Index: 1
# CHECK-NEXT: Name:{{.* }}(1)
# CHECK: Index: 2
# CHECK-NEXT: Name:{{.* }}(2)
# CHECK: Index: 3
# CHECK-NEXT: Name:{{.* }}(3)
# CHECK: Index: 4
# CHECK-NEXT: Name:{{.* }}(4)
# CHECK: Index: 5
# CHECK-NEXT: Name:{{.* }}(5)
# CHECK: Index: 6
# CHECK-NEXT: Name:{{.* }}(6)
# CHECK: Index: 7
# CHECK-NEXT: Name:{{.* }}(7)
# CHECK: Index: 8
# CHECK-NEXT: Name:{{.* }}(8)
# CHECK: Index: 9
# CHECK-NEXT: Name:{{.* }}(9)
# CHECK: Index: 10
# CHECK-NEXT: Name:{{.* }}(10)
# CHECK: Index: 11
# CHECK-NEXT: Name:{{.* }}(11)
# CHECK: Name: .shstrtab
# CHECK: SectionData (
# CHECK-NEXT: |..nobits..regula|
# CHECK-NEXT: |r..gnu.version_r|
# CHECK-NEXT: |..group..gnu.ver|
# CHECK-NEXT: |sion..dynsym..gn|
# CHECK-NEXT: |u.version_d..dyn|
# CHECK-NEXT: |amic..shstrtab..|
# CHECK-NEXT: |strtab..symtab..|
# CHECK-NEXT: |rela.|
# CHECK-NEXT: )
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .dynsym
Type: SHT_DYNSYM
ShName: 0x000000001
- Name: .symtab
Type: SHT_SYMTAB
ShName: 0x000000002
- Name: .dynamic
Type: SHT_DYNAMIC
ShName: 0x000000003
- Name: .rela
Type: SHT_RELA
ShName: 0x000000004
- Name: .nobits
Type: SHT_NOBITS
ShName: 0x000000005
- Name: .group
Type: SHT_GROUP
Info: 0
ShName: 0x000000006
Members:
- Name: .gnu.version
Type: SHT_GNU_versym
Entries: [ ]
ShName: 0x000000007
- Name: .gnu.version_r
Type: SHT_GNU_verneed
Info: 0x0000000000000001
ShName: 0x000000008
Dependencies:
- Name: .gnu.version_d
Type: SHT_GNU_verdef
Info: 0x0000000000000001
ShName: 0x000000009
Entries:
- Name: .regular
Type: SHT_PROGBITS
ShName: 0x00000000A
- Name: .strtab
Type: SHT_STRTAB
ShName: 0x00000000B
|