From: simonmar Date: Tue, 8 Mar 2005 11:04:11 +0000 (+0000) Subject: [project @ 2005-03-08 11:04:11 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~950 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=b9dce85fb48b8c5e82a41e79eeb4843122ad46cf [project @ 2005-03-08 11:04:11 by simonmar] x86_64: the assembler doesn't like generating 8-byte relative relocations between text and rodata symbols. Hack around this by putting SRTs in the text segment for now. --- diff --git a/ghc/driver/mangler/ghc-asm.lprl b/ghc/driver/mangler/ghc-asm.lprl index 3934416..f801846 100644 --- a/ghc/driver/mangler/ghc-asm.lprl +++ b/ghc/driver/mangler/ghc-asm.lprl @@ -227,6 +227,14 @@ sub init_TARGET_STUFF { $T_HDR_misc = "\.text\n\t\.align 8\n"; $T_HDR_data = "\.data\n\t\.align 8\n"; $T_HDR_rodata = "\.section\t\.rodata\n\t\.align 8\n"; + + # the assembler on x86_64/Linux refuses to generate code for + # .quad x - y + # where x is in the text section and y in the rodata section. + # It works if y is in the text section, though. This is probably + # going to cause difficulties for PIC, I imagine. + $T_HDR_relrodata= "\.text\n\t\.align 8\n"; + $T_HDR_closure = "\.data\n\t\.align 8\n"; $T_HDR_info = "\.text\n\t\.align 8\n"; $T_HDR_entry = "\.text\n\t\.align 8\n";