From b9dce85fb48b8c5e82a41e79eeb4843122ad46cf Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 8 Mar 2005 11:04:11 +0000 Subject: [PATCH] [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. --- ghc/driver/mangler/ghc-asm.lprl | 8 ++++++++ 1 file changed, 8 insertions(+) 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"; -- 1.7.10.4