[project @ 2000-12-31 16:58:05 by panne]
[ghc-hetmet.git] / ghc / rts / Linker.h
1 /* -----------------------------------------------------------------------------
2  * $Id: Linker.h,v 1.1 2000/10/06 15:33:27 simonmar Exp $
3  *
4  * (c) The GHC Team, 2000
5  *
6  * RTS Object Linker
7  *
8  * ---------------------------------------------------------------------------*/
9
10 /* initialize the object linker */
11 void initLinker( void );
12
13 /* lookup a symbol in the hash table */
14 void *lookupSymbol( char *lbl );
15
16 /* delete an object from the pool */
17 HsInt unloadObj( char *path );
18
19 /* add an obj (populate the global symbol table, but don't resolve yet) */
20 HsInt loadObj( char *path );
21
22 /* resolve all the currently unlinked objects in memory */
23 HsInt resolveObjs( void );
24
25 /* These three are used by the garbage collector (see ClosureMacros.h,
26    IS_CODE_PTR etc.). */
27 int is_dynamically_loaded_code_or_rodata_ptr ( char* p );
28 int is_dynamically_loaded_rwdata_ptr ( char* p );
29 int is_not_dynamically_loaded_ptr ( char* p );