[PATCH] D101450: [ELF] Check the Elf_Rel addends for dynamic relocations
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 2 04:55:48 PDT 2021
arichardson added inline comments.
================
Comment at: lld/ELF/Arch/ARM.cpp:842
+ case R_ARM_JUMP_SLOT:
+ return 0; // The stored value at this location is not the addend.
}
----------------
MaskRay wrote:
> The value is not used.
>
> ld.so implementations don't use addend for JUMP_SLOT/GLOB_DAT.
I agree that the value at that location is not really an addend since Elf_Rela also uses the in-memory value instead of of the r_addend field (FreeBSD does `*where += (Elf_Addr)obj->relocbase;` for all JUMP_SLOT values).
Maybe `// These relocations do not have an implicit addend`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101450/new/
https://reviews.llvm.org/D101450
More information about the llvm-commits
mailing list