Skip to content

Commit ffabaa7

Browse files
committed
Add COMPAT_R_ARM_PREL31 patch to fix TH for armv6a android
1 parent 01b282c commit ffabaa7

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

overlays/bootstrap.nix

+2
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ in {
316316
# See https://gitlab.haskell.org/ghc/ghc/-/issues/16130
317317
++ onAndroid (fromUntil "9.6.6" "9.12" ./patches/ghc/ghc-9.6-static-linker-script-support.patch)
318318
++ onAndroid (from "9.12.1" ./patches/ghc/ghc-9.12-static-linker-script-support.patch)
319+
320+
++ onAndroid (from "9.6" ./patches/ghc/ghc-9.6-COMPAT_R_ARM_PREL31.patch)
319321
;
320322
in ({
321323
ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
2+
index 007daedb2f..0555abac72 100644
3+
--- a/rts/linker/Elf.c
4+
+++ b/rts/linker/Elf.c
5+
@@ -1295,6 +1295,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
6+
break;
7+
8+
case COMPAT_R_ARM_REL32: /* ((S + A) | T) – P */
9+
+ case COMPAT_R_ARM_PREL31:
10+
*(Elf32_Word *)P += S;
11+
*(Elf32_Word *)P |= T;
12+
*(Elf32_Word *)P -= P;
13+

0 commit comments

Comments
 (0)