aboutsummaryrefslogtreecommitdiff
path: root/crypto/perlasm/arm-xlate.pl
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2019-02-15 09:44:39 +0100
committerRichard Levitte <levitte@openssl.org>2019-02-16 16:59:23 +0100
commit3405db97e5448c784729b56837f3f8c776a01067 (patch)
tree3038d1d73fb0964915fdfd6377bb717722c02ea7 /crypto/perlasm/arm-xlate.pl
parentb2b580fe445e064da50c13d3e00f71022da16ece (diff)
downloadopenssl-3405db97e5448c784729b56837f3f8c776a01067.zip
openssl-3405db97e5448c784729b56837f3f8c776a01067.tar.gz
openssl-3405db97e5448c784729b56837f3f8c776a01067.tar.bz2
ARM assembly pack: make it Windows-friendly.
"Windows friendliness" means a) flipping .thumb and .text directives, b) always generate Thumb-2 code when asked(*); c) Windows-specific references to external OPENSSL_armcap_P. (*) so far *some* modules were compiled as .code 32 even if Thumb-2 was targeted. It works at hardware level because processor can alternate between the modes with no overhead. But clang --target=arm-windows's builtin assembler just refuses to compile .code 32... Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8252)
Diffstat (limited to 'crypto/perlasm/arm-xlate.pl')
-rwxr-xr-xcrypto/perlasm/arm-xlate.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/perlasm/arm-xlate.pl b/crypto/perlasm/arm-xlate.pl
index d78a8ba..b953f1f 100755
--- a/crypto/perlasm/arm-xlate.pl
+++ b/crypto/perlasm/arm-xlate.pl
@@ -28,6 +28,13 @@ my $fpu = sub {
if ($flavour =~ /linux/) { ".fpu\t".join(',',@_); }
else { ""; }
};
+my $rodata = sub {
+ SWITCH: for ($flavour) {
+ /linux/ && return ".section\t.rodata";
+ /ios/ && return ".section\t__TEXT,__const";
+ last;
+ }
+};
my $hidden = sub {
if ($flavour =~ /ios/) { ".private_extern\t".join(',',@_); }
else { ".hidden\t".join(',',@_); }