Print this page
4505 check_rtime should always check search paths

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/check_rtime.pl
          +++ new/usr/src/tools/scripts/check_rtime.pl
↓ open down ↓ 46 lines elided ↑ open up ↑
  47   47  # dependencies, and without using these newer objects an ldd(1) will produce
  48   48  # misleading error messages.  To compensate for this, the -D/-d options, or the
  49   49  # existence of the CODEMSG_WS/ROOT environment variables, cause the creation of
  50   50  # alternative dependency mappings via crle(1) configuration files that establish
  51   51  # any proto shared objects as alternatives to their base system location.  Thus
  52   52  # ldd(1) can be executed against these configuration files so that objects in a
  53   53  # proto area bind to their dependencies in the same proto area.
  54   54  
  55   55  
  56   56  # Define all global variables (required for strict)
  57      -use vars  qw($Prog $Env $Ena64 $Tmpdir $Gnuc);
       57 +use vars  qw($Prog $Env $Ena64 $Tmpdir);
  58   58  use vars  qw($LddNoU $Conf32 $Conf64);
  59   59  use vars  qw(%opt);
  60   60  use vars  qw($ErrFH $ErrTtl $InfoFH $InfoTtl $OutCnt1 $OutCnt2);
  61   61  
  62   62  # An exception file is used to specify regular expressions to match
  63   63  # objects. These directives specify special attributes of the object.
  64   64  # The regular expressions are read from the file and compiled into the
  65   65  # regular expression variables.
  66   66  #
  67   67  # The name of each regular expression variable is of the form
↓ open down ↓ 358 lines elided ↑ open up ↑
 426  426                                      "continued ...") if !$opt{o};
 427  427                                  next;
 428  428                          }
 429  429                          # Just print the symbol name.
 430  430                          $Line =~ s/$/\t<no -zdefs?>/;
 431  431                          onbld_elfmod::OutMsg($ErrFH, $ErrTtl, $RelPath, $Line);
 432  432                          next;
 433  433                  }
 434  434                  # Look for any unused search paths.
 435  435                  if ($Line =~ /unused search path=/) {
 436      -                        # Note, skip this comparison for __GNUC builds, as the
 437      -                        # gnu compilers insert numerous unused search paths.
 438      -                        if ($Gnuc == 1) {
 439      -                                next;
 440      -                        }
 441  436                          next if defined($EXRE_unused_rpath) &&
 442  437                              ($Line =~ $EXRE_unused_rpath);
 443  438  
 444  439                          if ($Secure) {
 445  440                                  $Line =~ s!$Tmpdir/!!;
 446  441                          }
 447  442                          $Line =~ s/^[ \t]*(.*)/\t$1\t<remove search path?>/;
 448  443                          onbld_elfmod::OutMsg($ErrFH, $ErrTtl, $RelPath, $Line);
 449  444                          next;
 450  445                  }
↓ open down ↓ 623 lines elided ↑ open up ↑
1074 1069          print "\t[-s]\t\tprocess .stab and .symtab entries\n";
1075 1070          print "\t[-v]\t\tprocess version definition entries\n";
1076 1071          print "\t[-w outdir]\tinterpret all files relative to given directory\n";
1077 1072          exit 1;
1078 1073  }
1079 1074  
1080 1075  die "$Prog: -D and -d options are mutually exclusive\n" if ($opt{D} && $opt{d});
1081 1076  
1082 1077  $Tmpdir = "/tmp" if (!($Tmpdir = $ENV{TMPDIR}) || (! -d $Tmpdir));
1083 1078  
1084      -# Determine whether this is a __GNUC build.  If so, unused search path
1085      -# processing is disabled.
1086      -$Gnuc = defined $ENV{__GNUC} ? 1 : 0;
1087      -
1088 1079  # If -w, change working directory to given location
1089 1080  !$opt{w} || chdir($opt{w}) || die "$Prog: can't cd to $opt{w}";
1090 1081  
1091 1082  # Locate and process the exceptions file
1092 1083  onbld_elfmod::LoadExceptionsToEXRE('check_rtime');
1093 1084  
1094 1085  # Is there a proto area available, either via the -d option, or because
1095 1086  # we are part of an activated workspace?
1096 1087  my $Proto;
1097 1088  if ($opt{d}) {
↓ open down ↓ 101 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX