Print this page
4853 illumos-gate is not lint-clean when built with openssl 1.0

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/openssl/libsunw_crypto/pl/x86_64-xlate.pl
          +++ new/usr/src/lib/openssl/libsunw_crypto/pl/x86_64-xlate.pl
↓ open down ↓ 60 lines elided ↑ open up ↑
  61   61  my $flavour = shift;
  62   62  my $output  = shift;
  63   63  if ($flavour =~ /\./) { $output = $flavour; undef $flavour; }
  64   64  
  65   65  open STDOUT,">$output" || die "can't open $output: $!"
  66   66          if (defined($output));
  67   67  
  68   68  my $gas=1;      $gas=0 if ($output =~ /\.asm$/);
  69   69  my $elf=1;      $elf=0 if (!$gas);
  70   70  my $win64=0;
  71      -my $prefix="";
       71 +my $prefix="sunw_";
  72   72  my $decor=".L";
  73   73  
  74   74  my $masmref=8 + 50727*2**-32;   # 8.00.50727 shipped with VS2005
  75   75  my $masm=0;
  76   76  my $PTR=" PTR";
  77   77  
  78   78  my $nasmref=2.03;
  79   79  my $nasm=0;
  80   80  
  81   81  if    ($flavour eq "mingw64")   { $gas=1; $elf=0; $win64=1;
↓ open down ↓ 378 lines elided ↑ open up ↑
 460  460                                          $current_function->{abi}  = "svr4";
 461  461                                          $current_function->{narg} = $narg;
 462  462                                          $current_function->{scope} = defined($globals{$sym})?"PUBLIC":"PRIVATE";
 463  463                                      } elsif ($type eq "\@abi-omnipotent") {
 464  464                                          undef $current_function;
 465  465                                          $current_function->{name} = $sym;
 466  466                                          $current_function->{scope} = defined($globals{$sym})?"PUBLIC":"PRIVATE";
 467  467                                      }
 468  468                                      $line =~ s/\@abi\-omnipotent/\@function/;
 469  469                                      $line =~ s/\@function.*/\@function/;
      470 +                                    $line =~ s/$sym/$globals{$sym} or $sym/e;
 470  471                                      last;
 471  472                                    };
 472  473                  /\.asciz/   && do { if ($line =~ /^"(.*)"$/) {
 473  474                                          $dir  = ".byte";
 474  475                                          $line = join(",",unpack("C*",$1),0);
 475  476                                      }
 476  477                                      last;
 477  478                                    };
 478  479                  /\.rva|\.long|\.quad/
 479  480                              && do { $line =~ s/([_a-z][_a-z0-9]*)/$globals{$1} or $1/gei;
 480  481                                      $line =~ s/\.L/$decor/g;
 481  482                                      last;
 482  483                                    };
      484 +                /\.size/    && do { $line =~ s/([_a-z][_a-z0-9]*)/$globals{$1} or $1/gei;
      485 +                                    last;
      486 +                                  };
 483  487              }
 484  488  
 485  489              if ($gas) {
 486  490                  $self->{value} = $dir . "\t" . $line;
 487  491  
 488  492                  if ($dir =~ /\.extern/) {
 489  493                      $self->{value} = ""; # swallow extern
 490  494                  } elsif (!$elf && $dir =~ /\.type/) {
 491  495                      $self->{value} = "";
 492  496                      $self->{value} = ".def\t" . ($globals{$1} or $1) . ";\t" .
↓ open down ↓ 13 lines elided ↑ open up ↑
 506  510                      $current_segment=$line;
 507  511                      if (!$elf && $current_segment eq ".init") {
 508  512                          if      ($flavour eq "macosx")  { $self->{value} = ".mod_init_func"; }
 509  513                          elsif   ($flavour eq "mingw64") { $self->{value} = ".section\t.ctors"; }
 510  514                      }
 511  515                  } elsif ($dir =~ /\.(text|data)/) {
 512  516                      $current_segment=".$1";
 513  517                  } elsif ($dir =~ /\.hidden/) {
 514  518                      if    ($flavour eq "macosx")  { $self->{value} = ".private_extern\t$prefix$line"; }
 515  519                      elsif ($flavour eq "mingw64") { $self->{value} = ""; }
      520 +                    else { $self->{value} = ".hidden\t$prefix$line"; }
 516  521                  } elsif ($dir =~ /\.comm/) {
 517  522                      $self->{value} = "$dir\t$prefix$line";
 518  523                      $self->{value} =~ s|,([0-9]+),([0-9]+)$|",$1,".log($2)/log(2)|e if ($flavour eq "macosx");
 519  524                  }
 520  525                  $line = "";
 521  526                  return $self;
 522  527              }
 523  528  
 524  529              # non-gas case or nasm/masm
 525  530              SWITCH: for ($dir) {
↓ open down ↓ 555 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX