According to /usr/include/elf.h and lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h.
For ELF64 relocation, types of offset and addend should be elf_addr and elf_sxword.
Depends on D145462.
Differential D145550
[LLDB][ObjectFileELF] Correct the return type of RelocOffset64 and RelocAddend64 SixWeining on Mar 7 2023, 11:08 PM. Authored by
Details According to /usr/include/elf.h and lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h. Depends on D145462.
Diff Detail
Event TimelineComment Actions Seems to me that member functions of ELFRelocation should use the typedefs from lldb/source/Plugins/ObjectFile/ELF/ELFHeader.h where there is one. elf_sxword for example. If you want to do that in another patch, that's fine. Just in case some test case is relying on the uin64_t -> unsigned down cast unintentionally.
Comment Actions Yes, I agree. Let me do that in another patch. Thanks.
|
I'm not familiar with how these relocation are processed, would it be better to use something with the sign bit set here? Or does it not matter, the value is just copied into .debug_info verbatim anyway.