From fc1b2092fb219fa199aa568f13639b2bacd6c899 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 2 Mar 1999 19:10:07 +0000 Subject: [PATCH] [project @ 1999-03-02 19:10:07 by sof] On mingw32, which is the only 'platform' where we support producing DLLs, prefix each static closure with a zero word. This is needed so that we can distinguish between pointers to (reversed!) info tables and static closures just by checking whether there's a zero word just above the pointed-to entity. Wish there was a better way.. --- ghc/driver/ghc-asm.lprl | 1 + 1 file changed, 1 insertion(+) diff --git a/ghc/driver/ghc-asm.lprl b/ghc/driver/ghc-asm.lprl index e640f42..da664ad 100644 --- a/ghc/driver/ghc-asm.lprl +++ b/ghc/driver/ghc-asm.lprl @@ -126,6 +126,7 @@ sub init_TARGET_STUFF { $T_HDR_data = "\.data\n\t\.align 2\n"; $T_HDR_consist = "\.text\n"; $T_HDR_closure = "\.data\n\t\.align 2\n"; + $T_HDR_closure = "\.data\n\t\.align 2\n\t.long 0\n" if ( $TargetPlatform =~ /.*-mingw32$/ ); $T_HDR_srt = "\.data\n\t\.align 2\n"; $T_HDR_info = "\.text\n\t\.align 2\n"; # NB: requires padding $T_HDR_entry = "\.text\n"; # no .align so we're right next to _info (arguably wrong...?) -- 1.7.10.4