From: sof Date: Tue, 2 Mar 1999 19:10:07 +0000 (+0000) Subject: [project @ 1999-03-02 19:10:07 by sof] X-Git-Tag: Approximately_9120_patches~6456 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fc1b2092fb219fa199aa568f13639b2bacd6c899;p=ghc-hetmet.git [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.. --- 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...?)