Commit 1b8911b4 authored by simonmar's avatar simonmar
Browse files

[project @ 2000-10-06 15:38:06 by simonmar]

The GC needs to be cleverer about which address ranges are in
text/data space if we're dynamically loading modules.

(BTW, this linking stuff is mostly ported from code written by Julian
Seward for STG Hugs).
parent c850515d
/* ----------------------------------------------------------------------------
* $Id: ClosureMacros.h,v 1.25 2000/08/17 15:19:17 rrt Exp $
* $Id: ClosureMacros.h,v 1.26 2000/10/06 15:38:06 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -100,15 +100,15 @@ extern StgFun start;
extern void* TEXT_SECTION_END_MARKER_DECL;
extern void* DATA_SECTION_END_MARKER_DECL;
#ifdef INTERPRETER
#if defined(INTERPRETER) || defined(GHCI)
/* Take into account code sections in dynamically loaded object files. */
#define IS_CODE_PTR(p) ( ((P_)(p) < (P_)&TEXT_SECTION_END_MARKER) \
|| is_dynamically_loaded_code_or_rodata_ptr(p) )
|| is_dynamically_loaded_code_or_rodata_ptr((char *)p) )
#define IS_DATA_PTR(p) ( ((P_)(p) >= (P_)&TEXT_SECTION_END_MARKER && \
(P_)(p) < (P_)&DATA_SECTION_END_MARKER) \
|| is_dynamically_loaded_rwdata_ptr(p) )
|| is_dynamically_loaded_rwdata_ptr((char *)p) )
#define IS_USER_PTR(p) ( ((P_)(p) >= (P_)&DATA_SECTION_END_MARKER) \
&& is_not_dynamically_loaded_ptr(p) )
&& is_not_dynamically_loaded_ptr((char *)p) )
#else
#define IS_CODE_PTR(p) ((P_)(p) < (P_)&TEXT_SECTION_END_MARKER)
#define IS_DATA_PTR(p) ((P_)(p) >= (P_)&TEXT_SECTION_END_MARKER && (P_)(p) < (P_)&DATA_SECTION_END_MARKER)
......
/* -----------------------------------------------------------------------------
* $Id: GC.c,v 1.84 2000/08/15 14:18:43 simonmar Exp $
* $Id: GC.c,v 1.85 2000/10/06 15:38:06 simonmar Exp $
*
* (c) The GHC Team 1998-1999
*
......@@ -52,6 +52,10 @@
# include "ParallelDebug.h"
# endif
#endif
#if defined(GHCI)
# include "HsFFI.h"
# include "Linker.h"
#endif
//@node STATIC OBJECT LIST, Static function declarations, Includes
//@subsection STATIC OBJECT LIST
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment