[all-commits] [llvm/llvm-project] 995f19: [JITLink][PowerPC] Correct handling of R_PPC64_REL...
bzEq via All-commits
all-commits at lists.llvm.org
Sun Jul 23 23:01:09 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 995f199f0a7645bac81f1786a623d66ca44dd415
https://github.com/llvm/llvm-project/commit/995f199f0a7645bac81f1786a623d66ca44dd415
Author: Kai Luo <lkail at cn.ibm.com>
Date: 2023-07-24 (Mon, 24 Jul 2023)
Changed paths:
M llvm/include/llvm/ExecutionEngine/JITLink/ppc64.h
M llvm/lib/ExecutionEngine/JITLink/ELF_ppc64.cpp
M llvm/lib/ExecutionEngine/JITLink/ppc64.cpp
M llvm/test/ExecutionEngine/JITLink/ppc64/ELF_ppc64le_relocations.s
Log Message:
-----------
[JITLink][PowerPC] Correct handling of R_PPC64_REL24_NOTOC
According to the ELFv2 ABI
> This relocation type is used to specify a function call where the TOC pointer is not initialized. It is similar to R_PPC64_REL24 in that it specifies a symbol to be resolved. If the symbol resolves to a function that requires a TOC pointer (as determined by st_other bits) then a link editor must arrange for the call to be via the global entry point of the called function. Any stub code must not rely on a valid TOC base address in r2.
This patch fixes handling of `R_PPC64_REL24_NOTOC` by using the same stub code sequence as lld.
Reviewed By: lhames
Differential Revision: https://reviews.llvm.org/D155672
More information about the All-commits
mailing list