summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-03-25 21:02:23 +0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-29 17:25:49 -0400
commitdf08d54841bfee99fe5f9bed9bbab5e4bd512a70 (patch)
tree7309821d25fa8d2ee141caa8348fdff091df9d99
parent4bbd1445e193bc314073e83820caa393567fcd25 (diff)
downloadhaskell-df08d54841bfee99fe5f9bed9bbab5e4bd512a70.tar.gz
[armv7] arm32 needs symbols!
-rw-r--r--rts/LinkerInternals.h2
-rw-r--r--rts/linker/Elf.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index 4be364cdb8..f81b0d2f45 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -170,7 +170,7 @@ typedef struct _Segment {
int n_sections;
} Segment;
-#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
+#if defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) || defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)
#define NEED_SYMBOL_EXTRAS 1
#endif
diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 8037d52b7c..d34b6e6e50 100644
--- a/rts/linker/Elf.c
+++ b/rts/linker/Elf.c
@@ -713,12 +713,13 @@ ocGetNames_ELF ( ObjectCode* oc )
#if defined(NEED_GOT) || RTS_LINKER_USE_MMAP
if (USE_CONTIGUOUS_MMAP || RtsFlags.MiscFlags.linkerAlwaysPic) {
/* The space for bss sections is already preallocated */
- ASSERT(oc->bssBegin != NULL);
+ CHECK(oc->bssBegin != NULL);
alloc = SECTION_NOMEM;
+ CHECK(oc->image != 0x0);
start =
oc->image + roundUpToAlign(oc->bssBegin - oc->image, align);
oc->bssBegin = (char*)start + size;
- ASSERT(oc->bssBegin <= oc->bssEnd);
+ CHECK(oc->bssBegin <= oc->bssEnd);
} else {
/* Use mmapForLinker to allocate .bss, otherwise the malloced
* address might be out of range for sections that are mmaped.
@@ -733,6 +734,7 @@ ocGetNames_ELF ( ObjectCode* oc )
mapped_offset = 0;
mapped_size = roundUpToPage(size);
}
+ CHECK(start != 0x0);
#else
alloc = SECTION_MALLOC;
start = stgCallocBytes(1, size, "ocGetNames_ELF(BSS)");