summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/perlasm/x86unix.pl
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/perlasm/x86unix.pl')
-rw-r--r--crypto/openssl/crypto/perlasm/x86unix.pl32
1 files changed, 27 insertions, 5 deletions
diff --git a/crypto/openssl/crypto/perlasm/x86unix.pl b/crypto/openssl/crypto/perlasm/x86unix.pl
index 3ad889f..72bde06 100644
--- a/crypto/openssl/crypto/perlasm/x86unix.pl
+++ b/crypto/openssl/crypto/perlasm/x86unix.pl
@@ -345,15 +345,15 @@ sub main'function_end
popl %ebx
popl %ebp
ret
-.${func}_end:
+.L_${func}_end:
EOF
push(@out,$tmp);
if ($main'cpp)
- { push(@out,"\tSIZE($func,.${func}_end-$func)\n"); }
+ { push(@out,"\tSIZE($func,.L_${func}_end-$func)\n"); }
elsif ($main'gaswin)
{ $tmp=push(@out,"\t.align 4\n"); }
- else { push(@out,"\t.size\t$func,.${func}_end-$func\n"); }
+ else { push(@out,"\t.size\t$func,.L_${func}_end-$func\n"); }
push(@out,".ident \"$func\"\n");
$stack=0;
%label=();
@@ -426,6 +426,11 @@ sub main'swtmp
sub main'comment
{
+ if ($main'elf) # GNU and SVR4 as'es use different comment delimiters,
+ { # so we just skip comments...
+ push(@out,"\n");
+ return;
+ }
foreach (@_)
{
if (/^\s*$/)
@@ -546,7 +551,9 @@ sub popvars
sub main'picmeup
{
local($dst,$sym)=@_;
- local($tmp)=<<___;
+ if ($main'cpp)
+ {
+ local($tmp)=<<___;
#if (defined(ELF) || defined(SOL)) && defined(PIC)
.align 8
call 1f
@@ -557,7 +564,22 @@ sub main'picmeup
leal $sym,$regs{$dst}
#endif
___
- push(@out,$tmp);
+ push(@out,$tmp);
+ }
+ elsif ($main'pic && ($main'elf || $main'aout))
+ {
+ push(@out,"\t.align\t8\n");
+ &main'call(&main'label("PIC_me_up"));
+ &main'set_label("PIC_me_up");
+ &main'blindpop($dst);
+ &main'add($dst,"\$$under"."_GLOBAL_OFFSET_TABLE_+[.-".
+ &main'label("PIC_me_up") . "]");
+ &main'mov($dst,&main'DWP($sym."\@GOT",$dst));
+ }
+ else
+ {
+ &main'lea($dst,&main'DWP($sym));
+ }
}
sub main'blindpop { &out1("popl",@_); }
OpenPOWER on IntegriCloud