From 11e5bca5a24ae2720bb8646f86b0dd13dfc8dabf Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Thu, 25 Mar 2021 21:02:23 +0800 Subject: [armv7] arm32 needs symbols! --- rts/LinkerInternals.h | 2 +- rts/linker/Elf.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index 4cec22f724..946aac1c8c 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -134,7 +134,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 fe76131889..2d043f3e9e 100644 --- a/rts/linker/Elf.c +++ b/rts/linker/Elf.c @@ -698,12 +698,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. @@ -714,6 +715,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)"); -- cgit v1.2.1