X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=driver%2Fmangler%2Fghc-asm.lprl;h=91d20d67db0faa23d716272d8ab72a46071ee299;hb=d061166982c65f8e61b4faf942bc5737da2b272c;hp=7bde909b03381a70fecb3134080ff95de46ec38c;hpb=4cf6fdd28fea80bd8e2bb86f2f5da15fd851f783;p=ghc-hetmet.git diff --git a/driver/mangler/ghc-asm.lprl b/driver/mangler/ghc-asm.lprl index 7bde909..91d20d6 100644 --- a/driver/mangler/ghc-asm.lprl +++ b/driver/mangler/ghc-asm.lprl @@ -218,7 +218,7 @@ sub init_TARGET_STUFF { $T_CONST_LBL = '^\.LC(\d+):$'; # regexp for what such a lbl looks like $T_POST_LBL = ':'; - $T_MOVE_DIRVS = '^(\s*\.(globl|text|data|section|align|size|type|ident|local)\s+.*\n)'; + $T_MOVE_DIRVS = '^(\s*\.(globl|text|data|section|align|size|type|ident|local)([ \t].*)?\n)'; $T_COPY_DIRVS = '\.(globl|type|size|local)'; $T_DOT_WORD = '\.(quad|long|value|byte|zero)'; @@ -236,6 +236,8 @@ sub init_TARGET_STUFF { # 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. + # + # See Note [x86-64-relative] in includes/InfoTables.h $T_HDR_relrodata= "\.text\n\t\.align 8\n"; $T_HDR_closure = "\.data\n\t\.align 8\n"; @@ -598,7 +600,7 @@ sub mangle_asm { # Labels ending "_str": these are literal strings. } elsif ( /^${T_US}([A-Za-z0-9_]+)_str${T_POST_LBL}$/ ) { $chk[++$i] = $_; - $chkcat[$i] = 'rodata'; + $chkcat[$i] = 'relrodata'; $chksymb[$i] = ''; } elsif ( $TargetPlatform =~ /-darwin/ && (/^\s*\.subsections_via_symbols/