Print this page
4519 ABI checking needs to adapt to modern times, run by default

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/onbld_elfmod_vertype.pm
          +++ new/usr/src/tools/scripts/onbld_elfmod_vertype.pm
↓ open down ↓ 95 lines elided ↑ open up ↑
  96   96  #
  97   97  #       If the version has 3 numberic values, cnt is 3, and micro
  98   98  #       is present. If there are 2 numeric values, cnt is 2, and micro
  99   99  #       is omitted.
 100  100  #
 101  101  sub Category {
 102  102          my ($Ver, $Soname) = @_;
 103  103  
 104  104          # For Solaris and related products, the SUNW_ prefix is
 105  105          # used for numbered public versions.
 106      -        if ($Ver =~ /^(SUNW_)(\d+)\.(\d+)(\.(\d+))?/) {
      106 +        if ($Ver =~ /^((?:SUNW|ILLUMOS)_)(\d+)\.(\d+)(\.(\d+))?/) {
 107  107                  return ('NUMBERED', 3, $1, $2, $3, $5) if defined($5);
 108  108                  return ('NUMBERED', 2, $1, $2, $3);
 109  109          }
 110  110  
 111  111          # Well known plain versions. In Solaris, these names were used
 112  112          # to tag symbols that come from the SVR4 underpinnings to Solaris.
 113  113          # Later Sun-specific additions are all tagged SUNW_xxx.
 114  114          return ('PLAIN')
 115  115              if (($Ver =~ /^SYSVABI_1.[23]$/) || ($Ver =~ /^SISCD_2.3[ab]*$/));
 116  116  
 117  117          # The link-editor creates "base" versions using the SONAME of the
 118  118          # object to contain  linker generated symbols (_etext, _edata, etc.).
 119  119          return ('SONAME')
 120  120              if ($Ver eq $Soname) && ($Soname ne '');
 121  121  
 122  122          # The Solaris convention is to use SUNWprivate to indicate
 123  123          # private versions. SUNWprivate can have a numeric suffix, but
 124  124          # the number is not significant for ELF versioning other than
 125  125          # being part of a unique name.
 126  126          return ('PRIVATE')
 127      -            if ($Ver =~ /^SUNWprivate(_[0-9.]+)?$/);
      127 +            if ($Ver =~ /^(SUNW|ILLUMOS)private(_[0-9.]+)?$/);
 128  128  
 129  129          # Anything else is a version we don't recognize.
 130  130          return ('UNKNOWN');
 131  131  }
 132  132  
 133  133  
 134  134  # Perl modules pulled in via 'require' must return an exit status.
 135  135  1;
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX