1 /* -----------------------------------------------------------------------------
3 * (c) The GHC Team, 2000
7 * ---------------------------------------------------------------------------*/
9 typedef enum { OBJECT_LOADED, OBJECT_RESOLVED } OStatus;
11 /* Indication of section kinds for loaded objects. Needed by
12 the GC for deciding whether or not a pointer on the stack
16 enum { SECTIONKIND_CODE_OR_RODATA,
19 SECTIONKIND_NOINFOAVAIL }
27 struct _Section* next;
32 struct _ProddableBlock {
35 struct _ProddableBlock* next;
39 /* Jump Islands are sniplets of machine code required for relative
40 * address relocations on the PowerPC.
42 #ifdef powerpc_HOST_ARCH
44 short lis_r12, hi_addr;
45 short ori_r12_r12, lo_addr;
51 /* Top-level structure for an object module. One of these is allocated
52 * for each object file in use.
54 typedef struct _ObjectCode {
58 char* formatName; /* eg "ELF32", "DLL", "COFF", etc. */
60 /* An array containing ptrs to all the symbol names copied from
61 this object into the global symbol hash table. This is so that
62 we know which parts of the latter mapping to nuke when this
63 object is removed from the system. */
67 /* ptr to malloc'd lump of memory holding the obj file */
70 /* The section-kind entries for this object module. Linked
74 /* A private hash table for local symbols. */
77 /* Allow a chain of these things */
78 struct _ObjectCode * next;
80 /* SANITY CHECK ONLY: a list of the only memory regions which may
81 safely be prodded during relocation. Any attempt to prod
82 outside one of these is an error in the linker. */
83 ProddableBlock* proddables;
86 /* Procedure Linkage Table for this object */
88 unsigned int pltIndex;
91 #ifdef powerpc_HOST_ARCH
92 ppcJumpIsland *jump_islands;
93 unsigned long island_start_symbol;
94 unsigned long n_islands;
99 extern ObjectCode *objects;