summaryrefslogtreecommitdiffstats
path: root/crypto/perlasm
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2017-05-10 14:24:56 -0400
committerRich Salz <rsalz@openssl.org>2017-05-11 17:00:23 -0400
commite195c8a2562baef0fdcae330556ed60b1e922b0e (patch)
tree7eb522b546e809ce986cbba3ce714e28ad62e49a /crypto/perlasm
parent07fbdfe94d65b125a21488273d70eecf62fec447 (diff)
Remove filename argument to x86 asm_init.
The assembler already knows the actual path to the generated file and, in other perlasm architectures, is left to manage debug symbols itself. Notably, in OpenSSL 1.1.x's new build system, which allows a separate build directory, converting .pl to .s as the scripts currently do result in the wrong paths. This also avoids inconsistencies from some of the files using $0 and some passing in the filename. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3431)
Diffstat (limited to 'crypto/perlasm')
-rw-r--r--crypto/perlasm/README4
-rw-r--r--crypto/perlasm/x86asm.pl8
-rw-r--r--crypto/perlasm/x86gas.pl2
-rw-r--r--crypto/perlasm/x86masm.pl1
4 files changed, 6 insertions, 9 deletions
diff --git a/crypto/perlasm/README b/crypto/perlasm/README
index e90bd8e014..3177c37165 100644
--- a/crypto/perlasm/README
+++ b/crypto/perlasm/README
@@ -9,7 +9,7 @@ require "x86asm.pl";
The first thing we do is setup the file and type of assembler
-&asm_init($ARGV[0],$0);
+&asm_init($ARGV[0]);
The first argument is the 'type'. Currently
'cpp', 'sol', 'a.out', 'elf' or 'win32'.
@@ -62,7 +62,7 @@ So a very simple version of this function could be coded as
push(@INC,"perlasm","../../perlasm");
require "x86asm.pl";
- &asm_init($ARGV[0],"cacl.pl");
+ &asm_init($ARGV[0]);
&external_label("other");
diff --git a/crypto/perlasm/x86asm.pl b/crypto/perlasm/x86asm.pl
index 1ff46c92cc..fef94b3076 100644
--- a/crypto/perlasm/x86asm.pl
+++ b/crypto/perlasm/x86asm.pl
@@ -8,7 +8,7 @@
# require 'x86asm.pl';
-# &asm_init(<flavor>,"des-586.pl"[,$i386only]);
+# &asm_init(<flavor>[,$i386only]);
# &function_begin("foo");
# ...
# &function_end("foo");
@@ -259,9 +259,8 @@ sub ::asm_finish
}
sub ::asm_init
-{ my ($type,$fn,$cpu)=@_;
+{ my ($type,$cpu)=@_;
- $filename=$fn;
$i386=$cpu;
$elf=$cpp=$coff=$aout=$macosx=$win32=$netware=$mwerks=$android=0;
@@ -301,8 +300,7 @@ EOF
$pic=0;
for (@ARGV) { $pic=1 if (/\-[fK]PIC/i); }
- $filename =~ s/\.pl$//;
- &file($filename);
+ &file();
}
sub ::hidden {}
diff --git a/crypto/perlasm/x86gas.pl b/crypto/perlasm/x86gas.pl
index 2c8fce0779..5c7ea3880e 100644
--- a/crypto/perlasm/x86gas.pl
+++ b/crypto/perlasm/x86gas.pl
@@ -104,7 +104,7 @@ sub ::BC { @_; }
sub ::DWC { @_; }
sub ::file
-{ push(@out,".file\t\"$_[0].s\"\n.text\n"); }
+{ push(@out,".text\n"); }
sub ::function_begin_B
{ my $func=shift;
diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl
index d352f47055..dffee76211 100644
--- a/crypto/perlasm/x86masm.pl
+++ b/crypto/perlasm/x86masm.pl
@@ -85,7 +85,6 @@ sub ::DWC { "@_"; }
sub ::file
{ my $tmp=<<___;
-TITLE $_[0].asm
IF \@Version LT 800
ECHO MASM version 8.00 or later is strongly recommended.
ENDIF