File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
source/Plugins/ObjectFile/ELF
test/Shell/ObjectFile/ELF Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -116,11 +116,11 @@ class ELFRelocation {
116
116
117
117
static unsigned RelocOffset32 (const ELFRelocation &rel);
118
118
119
- static unsigned RelocOffset64 (const ELFRelocation &rel);
119
+ static elf_addr RelocOffset64 (const ELFRelocation &rel);
120
120
121
121
static unsigned RelocAddend32 (const ELFRelocation &rel);
122
122
123
- static unsigned RelocAddend64 (const ELFRelocation &rel);
123
+ static elf_sxword RelocAddend64 (const ELFRelocation &rel);
124
124
125
125
bool IsRela () { return (reloc.is <ELFRela *>()); }
126
126
@@ -192,7 +192,7 @@ unsigned ELFRelocation::RelocOffset32(const ELFRelocation &rel) {
192
192
return rel.reloc .get <ELFRela *>()->r_offset ;
193
193
}
194
194
195
- unsigned ELFRelocation::RelocOffset64 (const ELFRelocation &rel) {
195
+ elf_addr ELFRelocation::RelocOffset64 (const ELFRelocation &rel) {
196
196
if (rel.reloc .is <ELFRel *>())
197
197
return rel.reloc .get <ELFRel *>()->r_offset ;
198
198
else
@@ -206,7 +206,7 @@ unsigned ELFRelocation::RelocAddend32(const ELFRelocation &rel) {
206
206
return rel.reloc .get <ELFRela *>()->r_addend ;
207
207
}
208
208
209
- unsigned ELFRelocation::RelocAddend64 (const ELFRelocation &rel) {
209
+ elf_sxword ELFRelocation::RelocAddend64 (const ELFRelocation &rel) {
210
210
if (rel.reloc .is <ELFRel *>())
211
211
return 0 ;
212
212
else
Original file line number Diff line number Diff line change 6
6
# CHECK: Name: .debug_info
7
7
# CHECK: Data: (
8
8
# # Before relocation:
9
- # # 0000: 00000000 00000000 00000000
9
+ # # 0000: 00000000 00000000 00000000 00000000 00000000
10
10
# # After relocation:
11
- # CHECK-NEXT: 0000: 34120000 78560000 00000000
11
+ # CHECK-NEXT: 0000: 34120000 88776655 44332211 8899AABB CCDDEEFF
12
12
# CHECK-NEXT: )
13
13
14
14
--- !ELF
@@ -22,7 +22,7 @@ Sections:
22
22
Type : SHT_PROGBITS
23
23
- Name : .debug_info
24
24
Type : SHT_PROGBITS
25
- Content : 000000000000000000000000
25
+ Content : 0000000000000000000000000000000000000000
26
26
- Name : .rela.debug_info
27
27
Type : SHT_RELA
28
28
Info : .debug_info
@@ -34,7 +34,11 @@ Sections:
34
34
- Offset : 0x0000000000000004
35
35
Symbol : .debug_str
36
36
Type : R_LARCH_64
37
- Addend : 0x5678
37
+ Addend : 0x1122334455667788
38
+ - Offset : 0x000000000000000C
39
+ Symbol : .debug_str
40
+ Type : R_LARCH_64
41
+ Addend : 0xFFEEDDCCBBAA9988
38
42
Symbols :
39
43
- Name : .debug_str
40
44
Type : STT_SECTION
You can’t perform that action at this time.
0 commit comments