[project @ 2004-09-13 09:56:12 by simonmar]
[ghc-hetmet.git] / ghc / driver / mangler / ghc-asm.lprl
index fbcd934..66d68ec 100644 (file)
@@ -165,7 +165,7 @@ sub init_TARGET_STUFF {
     $T_STABBY      = 0; # 1 iff .stab things (usually if a.out format)
     $T_US          = ''; # _ if symbols have an underscore on the front
     $T_PRE_APP     = # regexp that says what comes before APP/NO_APP
-                     ($TargetPlatform =~ /-(linux|freebsd|netbsd)$/) ? '#' : '/' ;
+                     ($TargetPlatform =~ /-(linux|freebsd|netbsd|openbsd)$/) ? '#' : '/' ;
     $T_CONST_LBL    = '^\.LC(\d+):$'; # regexp for what such a lbl looks like
     $T_POST_LBL            = ':';
     $T_X86_PRE_LLBL_PAT = '\.L';
@@ -345,6 +345,7 @@ sub init_TARGET_STUFF {
     $T_HDR_data            = "\.data\n\t\.align 8\n";
     $T_HDR_rodata   = "\.text\n\t\.align 4\n";
     $T_HDR_closure  = "\.data\n\t\.align 4\n";
+    $T_HDR_info     = "\.text\n\t\.align 4\n";
     $T_HDR_entry    = "\.text\n\t\.align 4\n";
     $T_HDR_vector   = "\.text\n\t\.align 4\n";
 
@@ -494,8 +495,8 @@ sub mangle_asm {
            $chkcat[$i]  = 'data';
            $chksymb[$i] = '';
 
-       # Labels beginning "_c": these are literal strings.
-       } elsif ( /^${T_US}_c.*$/ ) {
+       # Labels ending "_str": these are literal strings.
+       } elsif ( /^${T_US}([A-Za-z0-9_]+)_str${T_POST_LBL}$/ ) {
            $chk[++$i]   = $_;
            $chkcat[$i]  = 'rodata';
            $chksymb[$i] = '';