summaryrefslogtreecommitdiffstats
path: root/crypto/perlasm
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2013-12-04 21:47:43 +0100
committerAndy Polyakov <appro@openssl.org>2013-12-04 21:47:43 +0100
commitf586d97191ad9821faea026df68aceaba45d1800 (patch)
treefd7d7c0989ccfb79f15259e9631d213767ac76a6 /crypto/perlasm
parenta61e51220f9ceee8d5984677d5e2886ede674e0b (diff)
perlasm/ppc-xlate.pl: improve linux64le support.
Suggested by: Marcello Cerri
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-xcrypto/perlasm/ppc-xlate.pl16
1 files changed, 11 insertions, 5 deletions
diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl
index c075d5fce0..57d9ec1610 100755
--- a/crypto/perlasm/ppc-xlate.pl
+++ b/crypto/perlasm/ppc-xlate.pl
@@ -27,7 +27,8 @@ my $globl = sub {
/osx/ && do { $name = "_$name";
last;
};
- /linux.*32/ && do { $ret .= ".globl $name\n";
+ /linux.*(32|64le)/
+ && do { $ret .= ".globl $name\n";
$ret .= ".type $name,\@function";
last;
};
@@ -49,7 +50,9 @@ my $globl = sub {
$ret;
};
my $text = sub {
- ($flavour =~ /aix/) ? ".csect" : ".text";
+ my $ret = ($flavour =~ /aix/) ? ".csect" : ".text";
+ $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/);
+ $ret;
};
my $machine = sub {
my $junk = shift;
@@ -64,8 +67,8 @@ my $size = sub {
if ($flavour =~ /linux/)
{ shift;
my $name = shift; $name =~ s|^[\.\_]||;
- my $ret = ".size $name,.-".($flavour=~/64/?".":"").$name;
- $ret .= "\n.size .$name,.-.$name" if ($flavour=~/64/);
+ my $ret = ".size $name,.-".($flavour=~/64$/?".":"").$name;
+ $ret .= "\n.size .$name,.-.$name" if ($flavour=~/64$/);
$ret;
}
else
@@ -159,7 +162,10 @@ while($line=<>) {
{
$line =~ s|(^[\.\w]+)\:\s*||;
my $label = $1;
- printf "%s:",($GLOBALS{$label} or $label) if ($label);
+ if ($label) {
+ printf "%s:",($GLOBALS{$label} or $label);
+ printf "\n.localentry\t$GLOBALS{$label},0" if ($GLOBALS{$label} && $flavour =~ /linux.*64le/);
+ }
}
{