File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Filter options
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Original file line number Diff line number Diff line change 228
228
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/ghc-8.10.7-linker-weak-and-common.patch
229
229
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/libc-memory-symbols.patch
230
230
++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/android-base-needs-iconv.patch
231
+ ++ final . lib . optional ( versionAtLeast "8.10" && versionLessThan "9.0" && final . targetPlatform . isAndroid ) ./patches/ghc/ghc-8.10.7-weak-symbols-2.patch
231
232
;
232
233
in ( {
233
234
ghc844 = final . callPackage ../compiler/ghc ( traceWarnOld "8.4" {
Original file line number Diff line number Diff line change
1
+ diff --git a/rts/Linker.c b/rts/Linker.c
2
+ index 727fe74..12a22d7 100644
3
+ --- a/rts/Linker.c
4
+ +++ b/rts/Linker.c
5
+ @@ -1810,6 +1810,8 @@ static HsInt resolveObjs_ (void)
6
+ IF_DEBUG(linker, debugBelch("resolveObjs: start\n"));
7
+
8
+ for (ObjectCode *oc = objects; oc; oc = oc->next) {
9
+ + if(oc->status == OBJECT_RESOLVED)
10
+ + continue;
11
+ int r = ocTryLoad(oc);
12
+ if (!r)
13
+ {
14
+ diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
15
+ index c3f9110..1b497af 100644
16
+ --- a/rts/linker/Elf.c
17
+ +++ b/rts/linker/Elf.c
18
+ @@ -963,10 +963,15 @@ ocGetNames_ELF ( ObjectCode* oc )
19
+ stab[j].st_size, stab[j].st_value, nm);
20
+ }
21
+ */
22
+ - symbol->addr = (SymbolAddr*)(
23
+ - (intptr_t) oc->sections[secno].start +
24
+ - (intptr_t) symbol->elf_sym->st_value);
25
+ - ASSERT(symbol->addr != 0x0);
26
+ + if(shndx == SHN_UNDEF && ELF_ST_BIND(symbol->elf_sym->st_info) == STB_WEAK) {
27
+ + symbol->addr = NULL;
28
+ + } else {
29
+ + symbol->addr = (SymbolAddr*)(
30
+ + (intptr_t) oc->sections[secno].start +
31
+ + (intptr_t) symbol->elf_sym->st_value);
32
+ + ASSERT(symbol->addr != 0x0);
33
+ + }
34
+ +
35
+ if (ELF_ST_BIND(symbol->elf_sym->st_info) == STB_LOCAL) {
36
+ isLocal = true;
37
+ isWeak = false;
You can’t perform that action at this time.
0 commit comments