Skip to content

Commit 0e227de

Browse files
SixWeiningtru
authored andcommitted
[LLDB][ObjectFileELF] Correct the return type of Reloc{Offset,Addend}32
This is a follow up of D145550. I think Reloc{Type,Symbol}{32,64} can keep unchanged as they are not directly returning a field of the ELFRel[a] struct. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D145571 (cherry picked from commit 27705f4)
1 parent 7d28293 commit 0e227de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ class ELFRelocation {
114114

115115
static unsigned RelocSymbol64(const ELFRelocation &rel);
116116

117-
static unsigned RelocOffset32(const ELFRelocation &rel);
117+
static elf_addr RelocOffset32(const ELFRelocation &rel);
118118

119119
static elf_addr RelocOffset64(const ELFRelocation &rel);
120120

121-
static unsigned RelocAddend32(const ELFRelocation &rel);
121+
static elf_sxword RelocAddend32(const ELFRelocation &rel);
122122

123123
static elf_sxword RelocAddend64(const ELFRelocation &rel);
124124

@@ -185,7 +185,7 @@ unsigned ELFRelocation::RelocSymbol64(const ELFRelocation &rel) {
185185
return ELFRela::RelocSymbol64(*rel.reloc.get<ELFRela *>());
186186
}
187187

188-
unsigned ELFRelocation::RelocOffset32(const ELFRelocation &rel) {
188+
elf_addr ELFRelocation::RelocOffset32(const ELFRelocation &rel) {
189189
if (rel.reloc.is<ELFRel *>())
190190
return rel.reloc.get<ELFRel *>()->r_offset;
191191
else
@@ -199,7 +199,7 @@ elf_addr ELFRelocation::RelocOffset64(const ELFRelocation &rel) {
199199
return rel.reloc.get<ELFRela *>()->r_offset;
200200
}
201201

202-
unsigned ELFRelocation::RelocAddend32(const ELFRelocation &rel) {
202+
elf_sxword ELFRelocation::RelocAddend32(const ELFRelocation &rel) {
203203
if (rel.reloc.is<ELFRel *>())
204204
return 0;
205205
else

0 commit comments

Comments
 (0)