Fix GHCi on PowerPC OS X
authorIan Lynagh <igloo@earth.li>
Sun, 28 Jan 2007 21:32:16 +0000 (21:32 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 28 Jan 2007 21:32:16 +0000 (21:32 +0000)
David Kirkman and Peter Tanski noticed that a line had been removed during
a patch merge which meant that oc->image pointed to the wrong place and
ultimately caused an error from realloc.

rts/Linker.c

index d0c120b..789093d 100644 (file)
@@ -1324,6 +1324,7 @@ loadObj( char *path )
     // that the actual sections end up aligned again.
    oc->misalignment = machoGetMisalignment(f);
    oc->image = stgMallocBytes(oc->fileSize + oc->misalignment, "loadObj(image)");
+   oc->image += misalignment;
 #  else
    oc->image = stgMallocBytes(oc->fileSize, "loadObj(image)");
 #  endif