summaryrefslogtreecommitdiff
path: root/rts/linker/MachO.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-10-30 14:47:53 -0400
committerBen Gamari <ben@smart-cactus.org>2018-10-30 16:12:00 -0400
commit9cbf6f2baf793e361d41b9c36497c5601ff22253 (patch)
treea6fcb61e43f95c23d046301edf41a727959054ad /rts/linker/MachO.c
parent7e1690d17b39a9491e46b12297adad8d0c89b550 (diff)
downloadhaskell-9cbf6f2baf793e361d41b9c36497c5601ff22253.tar.gz
Revert "Allocate bss section within proper range of other sections"
This reverts commit e019ec94f12268dd92ea5d5204e9e57e7ebf10ca. This sadly breaks the external interpreter on i386. For instance, see https://circleci.com/gh/ghc/ghc/10925.
Diffstat (limited to 'rts/linker/MachO.c')
-rw-r--r--rts/linker/MachO.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index 7d5ff32276..ff8ef7a1e4 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -186,10 +186,10 @@ resolveImports(
#if NEED_SYMBOL_EXTRAS
#if defined(powerpc_HOST_ARCH)
int
-ocAllocateExtras_MachO(ObjectCode* oc)
+ocAllocateSymbolExtras_MachO(ObjectCode* oc)
{
- IF_DEBUG(linker, debugBelch("ocAllocateExtras_MachO: start\n"));
+ IF_DEBUG(linker, debugBelch("ocAllocateSymbolExtras_MachO: start\n"));
// Find out the first and last undefined external
// symbol, so we don't have to allocate too many
@@ -218,31 +218,28 @@ ocAllocateExtras_MachO(ObjectCode* oc)
}
if (max >= min) {
- return ocAllocateExtras(oc, max - min + 1, min, 0);
+ return ocAllocateSymbolExtras(oc, max - min + 1, min);
}
- return ocAllocateExtras(oc, 0, 0, 0);
+ return ocAllocateSymbolExtras(oc,0,0);
}
#elif defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
int
-ocAllocateExtras_MachO(ObjectCode* oc)
+ocAllocateSymbolExtras_MachO(ObjectCode* oc)
{
- IF_DEBUG(linker, debugBelch("ocAllocateExtras_MachO: start\n"));
+ IF_DEBUG(linker, debugBelch("ocAllocateSymbolExtras_MachO: start\n"));
if (NULL != oc->info->symCmd) {
- IF_DEBUG(linker,
- debugBelch("ocAllocateExtras_MachO: allocate %d symbols\n",
- oc->info->symCmd->nsyms));
- IF_DEBUG(linker, debugBelch("ocAllocateExtras_MachO: done\n"));
- return ocAllocateExtras(oc, oc->info->symCmd->nsyms, 0, 0);
+ IF_DEBUG(linker, debugBelch("ocAllocateSymbolExtras_MachO: allocate %d symbols\n", oc->info->symCmd->nsyms));
+ IF_DEBUG(linker, debugBelch("ocAllocateSymbolExtras_MachO: done\n"));
+ return ocAllocateSymbolExtras(oc, oc->info->symCmd->nsyms, 0);
}
- IF_DEBUG(linker,
- debugBelch("ocAllocateExtras_MachO: allocated no symbols\n"));
- IF_DEBUG(linker, debugBelch("ocAllocateExtras_MachO: done\n"));
- return ocAllocateExtras(oc, 0, 0, 0);
+ IF_DEBUG(linker, debugBelch("ocAllocateSymbolExtras_MachO: allocated no symbols\n"));
+ IF_DEBUG(linker, debugBelch("ocAllocateSymbolExtras_MachO: done\n"));
+ return ocAllocateSymbolExtras(oc,0,0);
}
#else