diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-12-04 17:27:59 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2024-12-04 17:27:59 -0600 |
commit | a52113d2368551dc2c530b765f656e724fcd7739 (patch) | |
tree | e29c2aa61e7685cff165f23a043421de485ac9fe /bootstrap/llvm14/dyld-elf-ppc32.patch | |
parent | 9286e92e196082d80499e286c154086d0d302188 (diff) | |
download | packages-a52113d2368551dc2c530b765f656e724fcd7739.tar.gz packages-a52113d2368551dc2c530b765f656e724fcd7739.tar.bz2 packages-a52113d2368551dc2c530b765f656e724fcd7739.tar.xz packages-a52113d2368551dc2c530b765f656e724fcd7739.zip |
user/llvm14: Move to bootstrap/
Package is only needed by Rust bootstrap packages.
Diffstat (limited to 'bootstrap/llvm14/dyld-elf-ppc32.patch')
-rw-r--r-- | bootstrap/llvm14/dyld-elf-ppc32.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap/llvm14/dyld-elf-ppc32.patch b/bootstrap/llvm14/dyld-elf-ppc32.patch new file mode 100644 index 000000000..badea265f --- /dev/null +++ b/bootstrap/llvm14/dyld-elf-ppc32.patch @@ -0,0 +1,24 @@ +Author: A. Wilcox <awilfox@adelielinux.org> +Upstream-Status: Pending + +This implements the R_PPC_REL32 relocation type, which is needed for the +OrcJIT to work properly on 32-bit PowerPC. + +Needs more tests before submitting upstream, but seems to DTRT. + +--- llvm-14.0.6.src/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp.old 2022-06-22 16:46:24.000000000 +0000 ++++ llvm-14.0.6.src/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp 2022-11-28 06:33:12.239921624 +0000 +@@ -818,6 +818,13 @@ + case ELF::R_PPC_ADDR16_HA: + writeInt16BE(LocalAddress, applyPPCha(Value + Addend)); + break; ++ case ELF::R_PPC_REL32: ++ uint32_t FinalAddress = Section.getLoadAddressWithOffset(Offset); ++ int64_t delta = static_cast<int64_t>(Value - FinalAddress + Addend); ++ if (SignExtend64<32>(delta) != delta) ++ llvm_unreachable("Relocation R_PPC_REL32 overflow"); ++ writeInt32BE(LocalAddress, delta); ++ break; + } + } + |