diff options
author | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-08-22 15:00:41 -0500 |
---|---|---|
committer | Nicolas Frisby <nicolas.frisby@gmail.com> | 2013-08-22 15:00:54 -0500 |
commit | 84f9927c1a04b8e35b97101771d8f6d625643d9b (patch) | |
tree | 050d7265a24fa1ff9aecc4081bb01bc444520587 /rts/LinkerInternals.h | |
parent | 2eaf46fb1bb8c661c03f3e5e80622207ef2509d9 (diff) | |
parent | c24be4b761df558d9edc9c0b1554bb558c261b14 (diff) | |
download | haskell-late-dmd.tar.gz |
merged master into late-dmdlate-dmd
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r-- | rts/LinkerInternals.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index 864e0d1f2f..753279d547 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -9,7 +9,11 @@ #ifndef LINKERINTERNALS_H #define LINKERINTERNALS_H -typedef enum { OBJECT_LOADED, OBJECT_RESOLVED } OStatus; +typedef enum { + OBJECT_LOADED, + OBJECT_RESOLVED, + OBJECT_UNLOADED +} OStatus; /* Indication of section kinds for loaded objects. Needed by the GC for deciding whether or not a pointer on the stack @@ -82,6 +86,9 @@ typedef struct _ObjectCode { /* ptr to malloc'd lump of memory holding the obj file */ char* image; + /* flag used when deciding whether to unload an object file */ + int referenced; + #ifdef darwin_HOST_OS /* record by how much image has been deliberately misaligned after allocation, so that we can use realloc */ @@ -121,7 +128,10 @@ typedef struct _ObjectCode { ) extern ObjectCode *objects; +extern ObjectCode *unloaded_objects; void exitLinker( void ); +void freeObjectCode (ObjectCode *oc); + #endif /* LINKERINTERNALS_H */ |