/* initialise the stable pointer table */
initStablePtrTable();
+ /* Add some GC roots (using stable pointers): these are needed by
+ * all foreign export stubs, so they have to be treated as
+ */
+ getStablePtr((StgPtr)base_GHCziTopHandler_runIO_closure);
+ getStablePtr((StgPtr)base_GHCziTopHandler_runNonIO_closure);
+
/* initialise the shared Typeable store */
initTypeableStore();
, "-u", "_base_GHCziIOBase_blockedIndefinitely_closure"
, "-u", "_base_ControlziExceptionziBase_nestedAtomically_closure"
, "-u", "_base_GHCziWeak_runFinalizzerBatch_closure"
+ , "-u", "_base_GHCziTopHandler_runIO_closure"
+ , "-u", "_base_GHCziTopHandler_runNonIO_closure"
#else
"-u", "ghczmprim_GHCziTypes_Izh_static_info"
, "-u", "ghczmprim_GHCziTypes_Czh_static_info"
, "-u", "base_GHCziIOBase_blockedIndefinitely_closure"
, "-u", "base_ControlziExceptionziBase_nestedAtomically_closure"
, "-u", "base_GHCziWeak_runFinalizzerBatch_closure"
+ , "-u", "base_GHCziTopHandler_runIO_closure"
+ , "-u", "base_GHCziTopHandler_runNonIO_closure"
#endif
#ifdef LEADING_UNDERSCORE