[project @ 2005-10-25 02:57:47 by wolfgang]
authorwolfgang <unknown>
Tue, 25 Oct 2005 02:57:47 +0000 (02:57 +0000)
committerwolfgang <unknown>
Tue, 25 Oct 2005 02:57:47 +0000 (02:57 +0000)
Mac OS X/Darwin PowerPC: Fix a problem introduced by the recent Darwin/x86
commit.

Remember how we deliberately misaligned the .o file in memory to compensate
for Mach-O's lax alignment rules.
This should have been comitted along with Linker.c 1.203 about two weeks ago.

ghc/rts/LinkerInternals.h

index 5fdbd6c..07d6334 100644 (file)
@@ -70,6 +70,12 @@ typedef struct _ObjectCode {
     /* ptr to malloc'd lump of memory holding the obj file */
     char*      image;
 
+#ifdef darwin_HOST_OS
+    /* record by how much image has been deliberately misaligned
+       after allocation, so that we can use realloc */
+    int        misalignment;
+#endif
+
     /* The section-kind entries for this object module.  Linked
        list. */
     Section* sections;