summaryrefslogtreecommitdiff
path: root/rts/Linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Linker.c')
-rw-r--r--rts/Linker.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 7654f2b534..87f1eebf04 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1163,6 +1163,9 @@ void freeObjectCode (ObjectCode *oc)
break;
}
}
+ if (oc->sections[i].info) {
+ stgFree(oc->sections[i].info);
+ }
}
stgFree(oc->sections);
}
@@ -1732,6 +1735,9 @@ addSection (Section *s, SectionKind kind, SectionAlloc alloc,
s->mapped_start = mapped_start; /* start of mmap() block */
s->mapped_size = mapped_size; /* size of mmap() block */
+ s->info = (SectionFormatInfo*)stgCallocBytes(1, sizeof(SectionFormatInfo),
+ "addSection(SectionFormatInfo)");
+
IF_DEBUG(linker,
debugBelch("addSection: %p-%p (size %" FMT_Word "), kind %d\n",
start, (void*)((StgWord)start + size),