summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-09-09 19:52:02 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-10-12 19:16:40 -0400
commit5987357b2498db6b8014d96a6a2ef987b4158983 (patch)
treefcb165ed4ebcfa1026b8153b029e582f4b494862
parent005b1848eb4d1c5c5d2c175be0530a7b718bf7bf (diff)
downloadhaskell-5987357b2498db6b8014d96a6a2ef987b4158983.tar.gz
rts/RtsSymbols: fini array
-rw-r--r--rts/RtsSymbols.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c
index 32f94b3cca..fce399a075 100644
--- a/rts/RtsSymbols.c
+++ b/rts/RtsSymbols.c
@@ -1060,6 +1060,17 @@
#define RTS_LIBGCC_SYMBOLS
#endif
+#if !defined(DYNAMIC) && defined(linux_HOST_OS)
+// we need these for static musl builds. However when
+// linking shared objects (DLLs) this will fail, hence
+// we do not include them when building with -DDYNAMIC
+#define RTS_FINI_ARRAY_SYMBOLS \
+ SymI_NeedsProto(__fini_array_start) \
+ SymI_NeedsProto(__fini_array_end)
+#else
+#define RTS_FINI_ARRAY_SYMBOLS
+#endif
+
/* entirely bogus claims about types of these symbols */
#define SymI_NeedsProto(vvv) extern void vvv(void);
#define SymI_NeedsDataProto(vvv) extern StgWord vvv[];
@@ -1087,6 +1098,7 @@ RTS_MINGW_ONLY_SYMBOLS
RTS_DARWIN_ONLY_SYMBOLS
RTS_OPENBSD_ONLY_SYMBOLS
RTS_LIBGCC_SYMBOLS
+RTS_FINI_ARRAY_SYMBOLS
RTS_LIBFFI_SYMBOLS
#undef SymI_NeedsProto
#undef SymI_NeedsDataProto
@@ -1137,6 +1149,7 @@ RtsSymbolVal rtsSyms[] = {
RTS_DARWIN_ONLY_SYMBOLS
RTS_OPENBSD_ONLY_SYMBOLS
RTS_LIBGCC_SYMBOLS
+ RTS_FINI_ARRAY_SYMBOLS
RTS_LIBFFI_SYMBOLS
SymI_HasDataProto(nonmoving_write_barrier_enabled)
#if defined(darwin_HOST_OS) && defined(i386_HOST_ARCH)