changeset 3967:390705455279

6542674 check_rtime generates false unused messages for libc.so.1/libc_hwcap.so
author rie
date Wed, 04 Apr 2007 17:15:49 -0700
parents 7aaa946a7259
children abb9a4c15e2f
files usr/src/tools/scripts/check_rtime.pl
diffstat 1 files changed, 18 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/tools/scripts/check_rtime.pl	Wed Apr 04 16:59:29 2007 -0700
+++ b/usr/src/tools/scripts/check_rtime.pl	Wed Apr 04 17:15:49 2007 -0700
@@ -21,7 +21,7 @@
 #
 
 #
-# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 # ident	"%Z%%M%	%I%	%E% SMI"
@@ -61,7 +61,7 @@
 # Define all global variables (required for strict)
 use vars  qw($SkipDirs $SkipFiles $SkipTextrelFiles);
 use vars  qw($SkipUndefDirs $SkipUndefFiles $SkipUnusedDirs $SkipUnusedFiles);
-use vars  qw($SkipStabFiles $SkipNoExStkFiles);
+use vars  qw($SkipStabFiles $SkipNoExStkFiles $SkipCrleConf);
 use vars  qw($UnusedNoise $Prog $Mach $Isalist $Env $Ena64 $Tmpdir $Error);
 use vars  qw($UnusedFiles $UnusedPaths $LddNoU $Crle32 $Crle64 $Conf32 $Conf64);
 use vars  qw($SkipInterps $OldDeps %opt);
@@ -178,6 +178,13 @@
 	)$
 }x;
 
+# Identify any files that should be skipped when building a crle(1)
+# configuration file.  As the hwcap libraries can be loop-back mounted onto
+# libc, these can confuse crle(1) because of their identical dev/inode.
+$SkipCrleConf = qr{
+	lib/libc/libc_hwcap
+}x;
+
 # Define any files that should only have unused (ldd -u) processing.
 $UnusedPaths = qr{
 	ucb/shutdown			# libucb interposes on libc and makes
@@ -320,7 +327,7 @@
 	if ($Proto) {
 		# To support alternative dependency mapping we'll need ldd(1)'s
 		# -e option.  This is relatively new (s81_30), so make sure
-		# ldd(1)is capable before gathering any dependency information.
+		# ldd(1) is capable before gathering any dependency information.
 		if (system('ldd -e /usr/lib/lddstub 2> /dev/null')) {
 			print "ldd: does not support -e, unable to ";
 			print "create alternative dependency mappingings.\n";
@@ -397,7 +404,7 @@
 
 $Error = 0;
 
-# Clean up and temporary files.
+# Clean up any temporary files.
 sub CleanUp {
 	if ($Crle64) {
 		unlink $Crle64;
@@ -595,7 +602,7 @@
 	}
 
 	# Only use ldd unless we've encountered an interpreter that should
-	# ne skipped.
+	# be skipped.
 	if (!$SkipLdd && $Interp) {
 		if ($Secure) {
 			# The execution of a secure application over an nfs file
@@ -1023,6 +1030,12 @@
 				next;
 			}
 
+			if (!$opt{a}) {
+				if ($NewFull =~ $SkipCrleConf) {
+					next;
+				}
+			}
+				
 			# If this is a directory descend into it.
 			if (-d _) {
 				my($NewRel);