1 /* -----------------------------------------------------------------------------
2 * $Id: LinkerInternals.h,v 1.4 2001/08/29 15:12:21 sewardj Exp $
4 * (c) The GHC Team, 2000
8 * ---------------------------------------------------------------------------*/
10 typedef enum { OBJECT_LOADED, OBJECT_RESOLVED } OStatus;
12 /* Indication of section kinds for loaded objects. Needed by
13 the GC for deciding whether or not a pointer on the stack
16 typedef enum { SECTIONKIND_CODE_OR_RODATA,
19 SECTIONKIND_NOINFOAVAIL }
22 typedef struct { void* start; void* end; SectionKind kind; }
26 struct _ProddableBlock {
29 struct _ProddableBlock* next;
33 /* Top-level structure for an object module. One of these is allocated
34 * for each object file in use.
36 typedef struct _ObjectCode {
40 char* formatName; /* eg "ELF32", "DLL", "COFF", etc. */
42 /* An array containing ptrs to all the symbol names copied from
43 this object into the global symbol hash table. This is so that
44 we know which parts of the latter mapping to nuke when this
45 object is removed from the system. */
49 /* ptr to malloc'd lump of memory holding the obj file */
52 /* The section-kind entries for this object module. Dynamically expands. */
56 /* A private hash table for local symbols. */
59 /* Allow a chain of these things */
60 struct _ObjectCode * next;
62 /* SANITY CHECK ONLY: a list of the only memory regions which may
63 safely be prodded during relocation. Any attempt to prod
64 outside one of these is an error in the linker. */
65 ProddableBlock* proddables;
69 extern ObjectCode *objects;