From: Ian Lynagh Date: Sun, 28 Jan 2007 21:32:16 +0000 (+0000) Subject: Fix GHCi on PowerPC OS X X-Git-Tag: 2007-02-05~35 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=e576ba5d31fbae54c43e88316fb0dbdba9cbd4ff Fix GHCi on PowerPC OS X 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. --- diff --git a/rts/Linker.c b/rts/Linker.c index d0c120b..789093d 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -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