From 40aaaa640eee02495ecf80155043946b8839d575 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 2 Mar 1999 19:59:40 +0000 Subject: [PATCH] [project @ 1999-03-02 19:59:40 by sof] When putting the RTS in a DLL, we have to delay filling in the Charlike and Intlike tables until load-time. --- ghc/rts/StgMiscClosures.hc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ghc/rts/StgMiscClosures.hc b/ghc/rts/StgMiscClosures.hc index 2c028ee..669df32 100644 --- a/ghc/rts/StgMiscClosures.hc +++ b/ghc/rts/StgMiscClosures.hc @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: StgMiscClosures.hc,v 1.14 1999/02/11 14:22:54 simonm Exp $ + * $Id: StgMiscClosures.hc,v 1.15 1999/03/02 19:59:40 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -450,16 +450,32 @@ INFO_TABLE_CONSTR(StablePtr_static_info,Hugs_CONSTR_entry,0,sizeofW(StgStablePtr replace them with references to the static objects. -------------------------------------------------------------------------- */ +#ifdef HAVE_WIN32_DLL_SUPPORT +/* + * When sticking the RTS in a DLL, we delay populating the + * Charlike and Intlike tables until load-time, which is only + * when we've got the real addresses to the C# and I# closures. + * + */ +static const StgInfoTable czh_static_info; +static const StgInfoTable izh_static_info; +#define Char_hash_static_info czh_static_info +#define Int_hash_static_info izh_static_info +#else +#define Char_hash_static_info Czh_static_info +#define Int_hash_static_info Izh_static_info +#endif + #define CHARLIKE_HDR(n) \ { \ - STATIC_HDR(Czh_static_info, /* C# */ \ + STATIC_HDR(Char_hash_static_info, /* C# */ \ CCS_DONTZuCARE), \ data : n \ } #define INTLIKE_HDR(n) \ { \ - STATIC_HDR(Izh_static_info, /* I# */ \ + STATIC_HDR(Int_hash_static_info, /* I# */ \ CCS_DONTZuCARE), \ data : n \ } -- 1.7.10.4