0005-crypto-perlasm-ppc-xlate.pl-add-linux64v2-flavour.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From 07a0bbdd179a52907485fd793f0df31c097447af Mon Sep 17 00:00:00 2001
  2. From: Andy Polyakov <appro@openssl.org>
  3. Date: Sun, 5 May 2019 18:25:50 +0200
  4. Subject: [PATCH] crypto/perlasm/ppc-xlate.pl: add linux64v2 flavour
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This is a big endian ELFv2 configuration. ELFv2 was already being
  9. used for little endian, and big endian was traditionally ELFv1
  10. but there are practical configurations that use ELFv2 with big
  11. endian nowadays (Adélie Linux, Void Linux, possibly Gentoo, etc.)
  12. Reviewed-by: Paul Dale <paul.dale@oracle.com>
  13. Reviewed-by: Richard Levitte <levitte@openssl.org>
  14. (Merged from https://github.com/openssl/openssl/pull/8883)
  15. Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
  16. ---
  17. crypto/perlasm/ppc-xlate.pl | 8 ++++----
  18. 1 file changed, 4 insertions(+), 4 deletions(-)
  19. diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl
  20. index d220c6245b..eec82b8d48 100755
  21. --- a/crypto/perlasm/ppc-xlate.pl
  22. +++ b/crypto/perlasm/ppc-xlate.pl
  23. @@ -49,7 +49,7 @@ my $globl = sub {
  24. /osx/ && do { $name = "_$name";
  25. last;
  26. };
  27. - /linux.*(32|64le)/
  28. + /linux.*(32|64(le|v2))/
  29. && do { $ret .= ".globl $name";
  30. if (!$$type) {
  31. $ret .= "\n.type $name,\@function";
  32. @@ -80,7 +80,7 @@ my $globl = sub {
  33. };
  34. my $text = sub {
  35. my $ret = ($flavour =~ /aix/) ? ".csect\t.text[PR],7" : ".text";
  36. - $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64le/);
  37. + $ret = ".abiversion 2\n".$ret if ($flavour =~ /linux.*64(le|v2)/);
  38. $ret;
  39. };
  40. my $machine = sub {
  41. @@ -186,7 +186,7 @@ my $vmr = sub {
  42. # Some ABIs specify vrsave, special-purpose register #256, as reserved
  43. # for system use.
  44. -my $no_vrsave = ($flavour =~ /aix|linux64le/);
  45. +my $no_vrsave = ($flavour =~ /aix|linux64(le|v2)/);
  46. my $mtspr = sub {
  47. my ($f,$idx,$ra) = @_;
  48. if ($idx == 256 && $no_vrsave) {
  49. @@ -318,7 +318,7 @@ while($line=<>) {
  50. if ($label) {
  51. my $xlated = ($GLOBALS{$label} or $label);
  52. print "$xlated:";
  53. - if ($flavour =~ /linux.*64le/) {
  54. + if ($flavour =~ /linux.*64(le|v2)/) {
  55. if ($TYPES{$label} =~ /function/) {
  56. printf "\n.localentry %s,0\n",$xlated;
  57. }
  58. --
  59. 2.25.0