diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-09-09 19:52:02 -0400 |
---|---|---|
committer | Cheng Shao <cheng.shao@tweag.io> | 2021-10-28 17:28:18 +0000 |
commit | 238556a377f07d3f2abc289834f834c5c693118b (patch) | |
tree | be8e77e0d696a5a71a6f5942b305445fec36df53 | |
parent | f11f2ee8d982344ff31688701ef99f63c398be58 (diff) | |
download | haskell-238556a377f07d3f2abc289834f834c5c693118b.tar.gz |
rts/RtsSymbols: fini array
(cherry picked from commit 5987357b2498db6b8014d96a6a2ef987b4158983)
-rw-r--r-- | rts/RtsSymbols.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rts/RtsSymbols.c b/rts/RtsSymbols.c index 38b2a19a61..348e5ccc21 100644 --- a/rts/RtsSymbols.c +++ b/rts/RtsSymbols.c @@ -1011,6 +1011,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[]; @@ -1038,6 +1049,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 @@ -1088,6 +1100,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) |