gdb-index-invalid-section-index.yaml
4.91 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# RUN: yaml2obj %s -o %t.o
# RUN: ld.lld --gdb-index %t.o -o /dev/null
## We used to crash if a DWARFAddressRange has invalid SectionIndex (-1).
## Such DWARFAddressRange can be produced by clang -c -gdwarf-5 -gmlt before r360678.
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000000010
Content: 31C0C3
- Name: .debug_str_offsets
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: '1000000005000000000000000000000000000000'
- Name: .rela.debug_str_offsets
Type: SHT_RELA
Link: .symtab
AddressAlign: 0x0000000000000008
EntSize: 0x0000000000000018
Info: .debug_str_offsets
Relocations:
- Offset: 0x0000000000000008
Symbol: .debug_str
Type: R_X86_64_32
- Offset: 0x000000000000000C
Symbol: .debug_str
Type: R_X86_64_32
Addend: 1
- Offset: 0x0000000000000010
Symbol: .debug_str
Type: R_X86_64_32
Addend: 6
- Name: .debug_str
Type: SHT_PROGBITS
Flags: [ SHF_MERGE, SHF_STRINGS ]
AddressAlign: 0x0000000000000001
EntSize: 0x0000000000000001
Content: 00612E6363002F746D7000
- Name: .debug_abbrev
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: 011100252513050325721710171B25111B1206000000
- Name: .debug_info
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: 1B000000050001080000000001000400010000000000000000020003000000
- Name: .rela.debug_info
Type: SHT_RELA
Link: .symtab
AddressAlign: 0x0000000000000008
EntSize: 0x0000000000000018
Info: .debug_info
Relocations:
- Offset: 0x0000000000000008
Symbol: .debug_abbrev
Type: R_X86_64_32
- Offset: 0x0000000000000011
Symbol: .debug_str_offsets
Type: R_X86_64_32
Addend: 8
- Offset: 0x0000000000000015
Symbol: .debug_line
Type: R_X86_64_32
- Name: .debug_addr
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: 0C000000050008000000000000000000
- Name: .rela.debug_addr
Type: SHT_RELA
Link: .symtab
AddressAlign: 0x0000000000000008
EntSize: 0x0000000000000018
Info: .debug_addr
Relocations:
- Offset: 0x0000000000000008
Symbol: .text
Type: R_X86_64_64
- Name: .debug_line
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: 2D0000000500080025000000010101FB0E0D00010101010000000100000101011F010000000002011F020F010000000000
- Name: .rela.debug_line
Type: SHT_RELA
Link: .symtab
AddressAlign: 0x0000000000000008
EntSize: 0x0000000000000018
Info: .debug_line
Relocations:
- Offset: 0x0000000000000022
Symbol: .debug_line_str
Type: R_X86_64_32
- Offset: 0x000000000000002C
Symbol: .debug_line_str
Type: R_X86_64_32
Addend: 5
- Name: .debug_line_str
Type: SHT_PROGBITS
Flags: [ SHF_MERGE, SHF_STRINGS ]
AddressAlign: 0x0000000000000001
EntSize: 0x0000000000000001
Content: 2F746D7000612E636300
Symbols:
- Name: a.ll
Type: STT_FILE
Index: SHN_ABS
- Name: .text
Type: STT_SECTION
Section: .text
- Name: .debug_str_offsets
Type: STT_SECTION
Section: .debug_str_offsets
- Name: .debug_str
Type: STT_SECTION
Section: .debug_str
- Name: .debug_abbrev
Type: STT_SECTION
Section: .debug_abbrev
- Name: .debug_info
Type: STT_SECTION
Section: .debug_info
- Name: .debug_line
Type: STT_SECTION
Section: .debug_line
- Name: .debug_line_str
Type: STT_SECTION
Section: .debug_line_str
- Name: foo
Type: STT_FUNC
Section: .text
Binding: STB_GLOBAL
Size: 0x0000000000000003
...