Skip to content

Commit

Permalink
Add ghc-image-rel-amd64-srel32.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed May 31, 2023
1 parent 81f1f68 commit ef841df
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions overlays/bootstrap.nix
Expand Up @@ -189,6 +189,7 @@ in {
++ fromUntil "9.4.5" "9.4.6" ./patches/ghc/ghc-9.4.5-include-order-fix.patch
++ fromUntil "9.6.2" "9.8" ./patches/ghc/ghc-9.4.5-include-order-fix.patch
++ fromUntil "9.6.1" "9.8" ./patches/ghc/MR10116.patch
++ final.lib.optionals (final.stdenv.targetPlatform.isWindows) (fromUntil "9.6.1" "9.8" ./patches/ghc-image-rel-amd64-srel32.patch)
++ final.lib.optionals (final.stdenv.buildPlatform == final.stdenv.targetPlatform) (fromUntil "9.4.1" "9.6" ./patches/ghc/hadrian-build-deriveConstants-genprimopcode-ghc94.patch)
++ final.lib.optionals (final.stdenv.buildPlatform == final.stdenv.targetPlatform) (fromUntil "9.6.1" "9.8" ./patches/ghc/hadrian-build-deriveConstants-genprimopcode.patch)
++ final.lib.optionals (final.stdenv.targetPlatform.isGhcjs) (fromUntil "9.6.1" "9.8" ./patches/ghc/ghc-9.6-Merge-libiserv-with-ghci.patch)
Expand Down
21 changes: 21 additions & 0 deletions overlays/patches/ghc-image-rel-amd64-srel32.patch
@@ -0,0 +1,21 @@
From 28607c22f968587177c8a0d25f2e7a64b4ae5be8 Mon Sep 17 00:00:00 2001
From: Moritz Angermann <moritz.angermann@gmail.com>
Date: Wed, 31 May 2023 12:30:39 +0800
Subject: [PATCH] Update PEi386.c

---
rts/linker/PEi386.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c
index b5134235b02..682b4ec7e83 100644
--- a/rts/linker/PEi386.c
+++ b/rts/linker/PEi386.c
@@ -2038,6 +2038,7 @@ ocResolve_PEi386 ( ObjectCode* oc )
}
case 2: /* R_X86_64_32 (ELF constant 10) - IMAGE_REL_AMD64_ADDR32 (PE constant 2) */
case 3: /* IMAGE_REL_AMD64_ADDR32NB (PE constant 3) */
+ case 14: /* R_X86_64_PC64 (ELF constant 24) - IMAGE_REL_AMD64_SREL32 (PE constant 14) */
case 17: /* R_X86_64_32S ELF constant, no PE mapping. See note [ELF constant in PE file] */
{
uint64_t v;

0 comments on commit ef841df

Please sign in to comment.