Skip to content

Commit 754644f

Browse files
committed
Update patches
1 parent 754ffaf commit 754644f

7 files changed

+40
-7
lines changed

overlays/patches/ghc/ghc-9.6-0001-Refactor-IServ.hs.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 45624fed757dea6ad1e2dbc6840603092da5359a Mon Sep 17 00:00:00 2001
22
From: Moritz Angermann <[email protected]>
33
Date: Wed, 21 Feb 2024 02:56:21 +0000
4-
Subject: [PATCH 1/5] Refactor IServ.hs
4+
Subject: [PATCH 1/7] Refactor IServ.hs
55

66
---
77
libraries/libiserv/src/IServ.hs | 12 ++++++------

overlays/patches/ghc/ghc-9.6-0002-Drop-spurious-8-byte-offset-from-elf_plt.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From e3bf7ebed5a6a1ea00408ca42b4090e056bbbe5a Mon Sep 17 00:00:00 2001
22
From: Moritz Angermann <[email protected]>
33
Date: Wed, 21 Feb 2024 03:05:11 +0000
4-
Subject: [PATCH 2/5] Drop spurious 8 byte offset from elf_plt.
4+
Subject: [PATCH 2/7] Drop spurious 8 byte offset from elf_plt.
55

66
---
77
rts/linker/elf_plt.c | 2 +-

overlays/patches/ghc/ghc-9.6-0003-Better-pool-alignment.-We-still-hardcode-section-ali.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 622e85098c8b10dfa163e74c56bda9968fd80ada Mon Sep 17 00:00:00 2001
22
From: Moritz Angermann <[email protected]>
33
Date: Wed, 21 Feb 2024 03:06:36 +0000
4-
Subject: [PATCH 3/5] Better pool alignment. We still hardcode section
4+
Subject: [PATCH 3/7] Better pool alignment. We still hardcode section
55
alignments. But that's ok for now.
66

77
---

overlays/patches/ghc/ghc-9.6-0004-ghcidladdr.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From cd3ed75e62c033466d824995b797e85bbe3c27a8 Mon Sep 17 00:00:00 2001
22
From: Moritz Angermann <[email protected]>
33
Date: Wed, 21 Feb 2024 03:07:33 +0000
4-
Subject: [PATCH 4/5] ghcidladdr
4+
Subject: [PATCH 4/7] ghcidladdr
55

66
---
77
rts/Linker.c | 24 ++++++++++++++++++++++++

overlays/patches/ghc/ghc-9.6-0005-Better-interpreter-debugging.-Needs-ghcidladdr.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
From 8e978b309dad28cc70e5383d59fb4af67d359239 Mon Sep 17 00:00:00 2001
22
From: Moritz Angermann <[email protected]>
33
Date: Wed, 21 Feb 2024 03:08:11 +0000
4-
Subject: [PATCH 5/5] Better interpreter debugging. Needs ghcidladdr!
4+
Subject: [PATCH 5/7] Better interpreter debugging. Needs ghcidladdr!
55

66
---
77
rts/Interpreter.c | 134 ++++++++++++++++++++++++++++++++++++++++++++--

overlays/patches/ghc/ghc-9.6-0006-Adds-support-for-Hidden-symbols.patch

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ index c3a5b5d..b826af8 100644
2929
+ default: barf("symbolTypeString: unknown symbol type (%d)", type);
3030
}
3131
}
32-
3332
@@ -277,10 +277,19 @@ int ghciInsertSymbolTable(
3433
}
3534
else if (pinfo->type ^ type)
@@ -58,7 +57,6 @@ index c3a5b5d..b826af8 100644
5857
);
5958
+ debugBelch("Address of new symbol: %p, old symbol: %p\n", data, pinfo->value);
6059
+ debugBelch("Type of symbol; new: %d, existing: %d\n", type, pinfo->type);
61-
6260
return 0;
6361
}
6462
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
From e00fa7688c2442ed8590d4cd003c31dd46c7a0ff Mon Sep 17 00:00:00 2001
2+
From: Moritz Angermann <[email protected]>
3+
Date: Wed, 21 Feb 2024 08:14:01 +0000
4+
Subject: [PATCH 7/7] fixup! Better pool alignment. We still hardcode section
5+
alignments. But that's ok for now.
6+
7+
---
8+
rts/linker/Elf.c | 4 ++--
9+
1 file changed, 2 insertions(+), 2 deletions(-)
10+
11+
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
12+
index 05db9b3..fd33458 100644
13+
--- a/rts/linker/Elf.c
14+
+++ b/rts/linker/Elf.c
15+
@@ -876,7 +876,7 @@ ocGetNames_ELF ( ObjectCode* oc )
16+
* address might be out of range for sections that are mmaped.
17+
*/
18+
alloc = SECTION_POOL;
19+
- start = memPoolAlloc(kind, 0xff, size);
20+
+ start = memPoolAlloc(kind, 0xff, poolAlign(0xff, size));
21+
// mmapAnonForLinker(size);
22+
if (start == NULL) {
23+
barf("failed to mmap memory for bss. "
24+
@@ -1035,7 +1035,7 @@ ocGetNames_ELF ( ObjectCode* oc )
25+
void * common_mem = NULL;
26+
if(common_size > 0) {
27+
common_mem = // mmapAnonForLinker(common_size);
28+
- memPoolAlloc(SECTIONKIND_RWDATA, 0xff, common_size);
29+
+ memPoolAlloc(SECTIONKIND_RWDATA, 0xff, poolAlign(0xff,common_size));
30+
if (common_mem == NULL) {
31+
barf("ocGetNames_ELF: Failed to allocate memory for SHN_COMMONs");
32+
}
33+
--
34+
2.33.0
35+

0 commit comments

Comments
 (0)