diff options
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r-- | rts/LinkerInternals.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h index 79fb46eb2b..5cd35f2e5b 100644 --- a/rts/LinkerInternals.h +++ b/rts/LinkerInternals.h @@ -130,7 +130,7 @@ typedef struct _Segment { SegmentProt prot; /* mem protection to set after all symbols were * resolved */ - int *sections_idx; /* an array of section indexes assigned to this segment */ + int *sections_idx; /* an array of section indexes assigned to this segment */ int n_sections; } Segment; @@ -246,9 +246,10 @@ typedef struct _ObjectCode { HashTable *extraInfos; #if RTS_LINKER_USE_MMAP == 1 - /* The m32 allocator used for allocating small sections - * and symbol extras during loading */ - m32_allocator *m32; + /* The m32 allocators used for allocating small sections and symbol extras + * during loading. We have two: one for (writeable) data and one for + * (read-only/executable) code. */ + m32_allocator *rw_m32, *rx_m32; #endif } ObjectCode; @@ -293,6 +294,7 @@ void freeObjectCode (ObjectCode *oc); SymbolAddr* loadSymbol(SymbolName *lbl, RtsSymbolInfo *pinfo); void *mmapForLinker (size_t bytes, uint32_t flags, int fd, int offset); +void mmapForLinkerMarkExecutable (void *start, size_t len); void addProddableBlock ( ObjectCode* oc, void* start, int size ); void checkProddableBlock (ObjectCode *oc, void *addr, size_t size ); |