diff options
author | Weining Lu <luweining@loongson.cn> | 2023-03-13 15:44:58 +0800 |
---|---|---|
committer | Weining Lu <luweining@loongson.cn> | 2023-03-13 16:23:10 +0800 |
commit | 27705f456a3a03e7c935f7f573c05f742df4f272 (patch) | |
tree | 914250b582fde109dee747edfd2037384c490803 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | |
parent | 174a38f9c3167573e060493b94135cf453d27879 (diff) | |
download | llvm-27705f456a3a03e7c935f7f573c05f742df4f272.zip llvm-27705f456a3a03e7c935f7f573c05f742df4f272.tar.gz llvm-27705f456a3a03e7c935f7f573c05f742df4f272.tar.bz2 |
[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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index 6281cfa..5b75738 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -114,11 +114,11 @@ public: static unsigned RelocSymbol64(const ELFRelocation &rel); - static unsigned RelocOffset32(const ELFRelocation &rel); + static elf_addr RelocOffset32(const ELFRelocation &rel); static elf_addr RelocOffset64(const ELFRelocation &rel); - static unsigned RelocAddend32(const ELFRelocation &rel); + static elf_sxword RelocAddend32(const ELFRelocation &rel); static elf_sxword RelocAddend64(const ELFRelocation &rel); @@ -185,7 +185,7 @@ unsigned ELFRelocation::RelocSymbol64(const ELFRelocation &rel) { return ELFRela::RelocSymbol64(*rel.reloc.get<ELFRela *>()); } -unsigned ELFRelocation::RelocOffset32(const ELFRelocation &rel) { +elf_addr ELFRelocation::RelocOffset32(const ELFRelocation &rel) { if (rel.reloc.is<ELFRel *>()) return rel.reloc.get<ELFRel *>()->r_offset; else @@ -199,7 +199,7 @@ elf_addr ELFRelocation::RelocOffset64(const ELFRelocation &rel) { return rel.reloc.get<ELFRela *>()->r_offset; } -unsigned ELFRelocation::RelocAddend32(const ELFRelocation &rel) { +elf_sxword ELFRelocation::RelocAddend32(const ELFRelocation &rel) { if (rel.reloc.is<ELFRel *>()) return 0; else |