From: Simon Marlow Date: Thu, 10 May 2007 09:20:19 +0000 (+0000) Subject: FIX #1343: regex bug in the x86_64 mangler settings X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=4414ec29267052c5e5dfbc36d596797c7177f822;hp=0a183bd0d5d9952699295fa9506de0df97392ef5 FIX #1343: regex bug in the x86_64 mangler settings --- diff --git a/driver/mangler/ghc-asm.lprl b/driver/mangler/ghc-asm.lprl index 7bde909..0bda1bb 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)'; @@ -598,7 +598,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/