Backport from HEAD:
[oweals/openssl.git] / crypto / perlasm / x86nasm.pl
index 0ec03ff8e0a6fe0142d9f30b31002462ee5c4064..ce2bed9bb290dc4393dfa0b8724acfc58eba98b7 100644 (file)
@@ -4,7 +4,7 @@ package x86nasm;
 
 *out=\@::out;
 
-$::lbdecor="\@L";              # local label decoration
+$::lbdecor="L\$";              # local label decoration
 $nmdecor=$::netware?"":"_";    # external name decoration
 $drdecor=$::mwerks?".":"";     # directive decoration
 
@@ -75,10 +75,13 @@ sub ::file
 {   if ($::mwerks)     { push(@out,".section\t.text,64\n"); }
     else
     { my $tmp=<<___;
-%ifdef __omf__
+%ifidn __OUTPUT_FORMAT__,obj
 section        code    use32 class=code align=64
-%else
+%elifidn __OUTPUT_FORMAT__,win32
+\$\@feat.00 equ 1
 section        .text   code align=64
+%else
+section        .text   code
 %endif
 ___
        push(@out,$tmp);
@@ -155,4 +158,9 @@ ___
     }
 }
 
+sub ::dataseg
+{   if ($mwerks)       { push(@out,".section\t.data,4\n");   }
+    else               { push(@out,"section\t.data align=4\n"); }
+}
+
 1;