1 /* -----------------------------------------------------------------------------
2 * $Id: LinkerInternals.h,v 1.1 2001/02/11 17:51:07 simonmar Exp $
4 * (c) The GHC Team, 2000
8 * ---------------------------------------------------------------------------*/
10 /* A bucket in the symbol hash-table. Primarily, maps symbol names to
11 * absolute addresses. All symbols from a given module are linked
12 * together, so they can be freed at the same time. There's also a
13 * bucket link field for the hash table.
15 typedef struct _SymbolVal {
20 typedef enum { OBJECT_LOADED, OBJECT_RESOLVED } OStatus;
22 /* Indication of section kinds for loaded objects. Needed by
23 the GC for deciding whether or not a pointer on the stack
26 typedef enum { SECTIONKIND_CODE_OR_RODATA,
29 SECTIONKIND_NOINFOAVAIL }
32 typedef struct { void* start; void* end; SectionKind kind; }
35 /* Top-level structure for an object module. One of these is allocated
36 * for each object file in use.
38 typedef struct _ObjectCode {
42 char* formatName; /* eg "ELF32", "DLL", "COFF", etc. */
47 /* ptr to malloc'd lump of memory holding the obj file */
50 /* The section-kind entries for this object module. Dynamically expands. */
54 /* Allow a chain of these things */
55 struct _ObjectCode * next;
58 extern ObjectCode *objects;