check_rtime revision 10730:b355127773a4
11592Srgrimes
21592Srgrimes#
31592Srgrimes# CDDL HEADER START
41592Srgrimes#
51592Srgrimes# The contents of this file are subject to the terms of the
61592Srgrimes# Common Development and Distribution License (the "License").
71592Srgrimes# You may not use this file except in compliance with the License.
81592Srgrimes#
91592Srgrimes# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
101592Srgrimes# or http://www.opensolaris.org/os/licensing.
111592Srgrimes# See the License for the specific language governing permissions
121592Srgrimes# and limitations under the License.
131592Srgrimes#
141592Srgrimes# When distributing Covered Code, include this CDDL HEADER in each
151592Srgrimes# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
161592Srgrimes# If applicable, add the following below this CDDL HEADER, with the
171592Srgrimes# fields enclosed by brackets "[]" replaced with your own identifying
181592Srgrimes# information: Portions Copyright [yyyy] [name of copyright owner]
191592Srgrimes#
201592Srgrimes# CDDL HEADER END
21262435Sbrueffer#
221592Srgrimes
231592Srgrimes#
241592Srgrimes# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
251592Srgrimes# Use is subject to license terms.
261592Srgrimes#
271592Srgrimes
281592Srgrimes# This file provides exceptions to the usual rules applied to ELF objects by
291592Srgrimes# check_rtime. All strings are Perl regular expressions that are compared to
301592Srgrimes# file paths. In addition to the standard Perl syntax, there is one extension:
311592Srgrimes#
321592Srgrimes#	MACH(dir)
331592Srgrimes#
341592Srgrimes# is expanded into a regular expression that matches the given
351592Srgrimes# directory, or a 64-bit subdirectory of the directory with the
361592Srgrimes# name of a 64-bit architecture. For example, MACH(lib) will match
3727074Ssteve# any of the following:
381592Srgrimes#
3927074Ssteve#	lib
401592Srgrimes#	lib/amd64
4169226Skris#	lib/sparcv9
4269226Skris
431592Srgrimes
441592Srgrimes# Directory hierarchies to skip completely
451592SrgrimesSKIP		^usr/lib/libc/			# optimized libc
461592SrgrimesSKIP		^usr/lib/rcm/			# 4426119
471592SrgrimesSKIP		^usr/perl5/			# alan's taking care of these :-)
481592SrgrimesSKIP		^usr/src/			# no objects in source code
491592Srgrimes
501592Srgrimes# Individual files that we don't examine
511592SrgrimesSKIP		^boot/grub/bin/grub$
521592SrgrimesSKIP		^usr/apache/libexec/mod_ipp.so$	# Apache loadable module
531592Srgrimes# USIII specific extns. cause ldd noise on USII bld. m/c
541592SrgrimesSKIP		^usr/lib/fps/sun4u/UltraSPARC.*/fptest$
551592SrgrimesSKIP		^usr/MACH(lib)/lddstub$		# lddstub has no dependencies
561592SrgrimesSKIP		^usr/MACH(lib)/libssagent\.so\.1$	# 4328854
5769226SkrisSKIP		^usr/lib/MACH(iconv)/geniconvtbl.so$	# 4384329
581592Srgrimes
591592Srgrimes# picl file exclusions (4385799)
601592SrgrimesSKIP		^usr/platform/.*/libpsvcplugin_psr\.so\.1
611592SrgrimesSKIP		^usr/platform/.*/libpsvcpolicy_psr\.so\.1
621592SrgrimesSKIP		^usr/platform/.*/libpsvcpolicy\.so\.1
631592SrgrimesSKIP		^usr/lib/sysevent/modules/picl_slm.so$
641592Srgrimes
651592Srgrimes# Objects that don't require a non-executable stack definition
661592SrgrimesEXEC_STACK	^platform/.*/MACH(kernel)/unix$
671592SrgrimesEXEC_STACK	^platform/.*/multiboot$
681592Srgrimes
691592Srgrimes# Objects for which we allow relocations to the text segment
701592SrgrimesTEXTREL		^platform/.*/MACH(kernel)/unix$
711592Srgrimes
721592Srgrimes# Directories and files that are allowed to have no direct bound symbols
731592SrgrimesNODIRECT	^platform/.*/MACH(kernel)/unix$
741592SrgrimesNODIRECT	^usr/ucb
751592SrgrimesNODIRECT	^usr/4lib/sbcp$
761592Srgrimes
771592Srgrimes# Identify any files that should be skipped when building a crle(1)
781592Srgrimes# configuration file.  As the hwcap libraries can be loop-back mounted onto
791592Srgrimes# libc, these can confuse crle(1) because of their identical dev/inode.
801592SrgrimesNOCRLEALT	^usr/lib/libc/libc_hwcap[1-3].so.1$
811592Srgrimes
821592Srgrimes# Files that should contain debugging information.
831592SrgrimesSTAB	^platform/.*/MACH(kernel)/unix$
841592Srgrimes
851592Srgrimes# Files that are allowed undefined references
861592SrgrimesUNDEF_REF	^usr/lib/libnisdb\.so\.2$
871592SrgrimesUNDEF_REF	^usr/snadm/lib/libsvm\.so\.1$
881592Srgrimes
891592Srgrimes# Objects allowed to have unused dependencies
901592SrgrimesUNUSED_DEPS	^usr/lib/picl/plugins/		# require devtree dependencies
911592SrgrimesUNUSED_DEPS	^usr/lib/libp	# profile libc makes libm an unused dep of libc
921592Srgrimes
931592Srgrimes# libm.so.2 dependency
941592SrgrimesUNUSED_OBJ	unused object=.*MACH(libm)/libm_hwcap1\.so\.2
951592Srgrimes
961592Srgrimes# Unused runpaths due to dlopen() use
971592SrgrimesUNUSED_RPATH	/usr/lib/fs/autofs.*\ from\ .automountd
981592SrgrimesUNUSED_RPATH	/etc/ppp/plugins.*\ from\ .*pppd
991592SrgrimesUNUSED_RPATH	/usr/lib/inet/ppp.*\ from\ .*pppd
1001592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libipsecutil\.so\.1
1011592SrgrimesUNUSED_RPATH	/usr/platform/.*rsmlib.*\ from\ .*librsm\.so\.2
1021592SrgrimesUNUSED_RPATH	\$ORIGIN.*\ from\ .*fcode.so
1031592SrgrimesUNUSED_RPATH	/opt/VRTSvxvm/lib.*\ from\ .*libdiskmgt\.so\.1
1041592Srgrimes
1051592Srgrimes# Unused runpaths in picl code
1061592SrgrimesUNUSED_RPATH	/usr/platform/.*\ from\ .*/usr/platform
1071592SrgrimesUNUSED_RPATH	/usr/lib/picl/.*\ from\ .*/usr/platform
10827074SsteveUNUSED_RPATH	/usr/platform/.*\ from\ .*/usr/lib/picl
1091592Srgrimes
1101592Srgrimes# Unused runpaths in non-OSNET objects we can't change
1111592SrgrimesUNUSED_RPATH	/usr/lib/mps/secv1.*\ from\ .*libnss3\.so
1121592SrgrimesUNUSED_RPATH	/usr/lib/mps.*\ from\ .*libnss3\.so
1131592SrgrimesUNUSED_RPATH	/usr/lib/mps.*\ from\ .*libnssutil3.so
1141592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libdbus-1\.so\.3
1151592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libdbus-glib-1\.so\.2
1161592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libglib-2\.0\.so\.0
1171592SrgrimesUNUSED_RPATH	/usr/X11/lib.*\ from\ .*libglib-2\.0\.so\.0
1181592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libgmodule-2\.0\.so\.0
1191592SrgrimesUNUSED_RPATH	/usr/X11/lib.*\ from\ .*libgmodule-2\.0\.so\.0
1201592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libgnomevfs-2\.so\.0
1211592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libgobject-2\.0\.so\.0
1221592SrgrimesUNUSED_RPATH	/usr/X11/lib.*\ from\ .*libgobject-2\.0\.so\.0
1231592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libgthread-2\.0\.so\.0
1241592SrgrimesUNUSED_RPATH	/usr/X11/lib.*\ from\ .*libgthread-2\.0\.so\.0
1251592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libcrypto\.so\.0\.9\.8
1261592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libnetsnmp\.so\.15
1271592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libgcc_s\.so\.1
12827074SsteveUNUSED_RPATH	/usr/postgres/8.3/lib.*\ from\ .*libpq\.so\.5
1291592SrgrimesUNUSED_RPATH	/usr/sfw/lib.*\ from\ .*libpq\.so\.5
1301592SrgrimesUNUSED_RPATH	/usr/lib/mps.*\ from\ .*libsmime3\.so
1311592SrgrimesUNUSED_RPATH	/usr/lib/mps.*\ from\ .*libssl3\.so
1321592Srgrimes
1331592Srgrimes# Unused runpaths for reasons not captured above
1341592SrgrimesUNUSED_RPATH	/usr/lib/smbsrv.*\ from\ .*libsmb\.so\.1 	# future needs
1351592SrgrimesUNUSED_RPATH	/usr.*\ from\ .*tst\.gcc\.exe			# gcc built
1361592Srgrimes
1371592Srgrimes
1381592Srgrimes# Unreferenced objects of non-OSnet objects we can't change
1391592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libcimapi\.so
1401592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libjvm\.so
14127074SsteveUNREF_OBJ	/lib.*\ of\ .*libnetsnmp\.so\.15
1421592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libnetsnmpagent\.so\.15
1431592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libnetsnmpmibs\.so\.15
1441592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libnetsnmphelpers\.so\.15
1451592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libnspr4\.so
1461592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libpq\.so\.5
1471592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libsoftokn3\.so
14827074SsteveUNREF_OBJ	/lib.*\ of\ .*libspmicommon\.so\.1
1491592SrgrimesUNREF_OBJ	/lib.*\ of\ .*libspmocommon\.so\.1
15090377SimpUNREF_OBJ	/lib.*\ of\ .*libssl3\.so
15190377SimpUNREF_OBJ	/lib.*\ of\ .*libtspi\.so\.1
15290377SimpUNREF_OBJ	/lib.*\ of\ .*libxml2\.so\.2
15390377SimpUNREF_OBJ	/lib.*\ of\ .*libxslt\.so\.1
15490377SimpUNREF_OBJ	/lib.*\ of\ .*libpq\.so\.4
15590377SimpUNREF_OBJ	/lib.*\ of\ .*libpython2\.4\.so\.1\.0
15690377Simp
15790377Simp# Unreferenced object of objects we can't change for other reasons
15890377SimpUNREF_OBJ	/libmapmalloc\.so\.1;\ unused\ dependency\ of	# interposer
15990377SimpUNREF_OBJ	/libstdc\+\+\.so\.6;\ unused\ dependency\ of	# gcc build
16090377SimpUNREF_OBJ	/libm\.so\.2.*\ of\ .*libstdc\+\+\.so\.6	# gcc build
16190377SimpUNREF_OBJ	/lib.*\ of\ .*/lib/picl/plugins/		# picl
16290377SimpUNREF_OBJ	/lib.*\ of\ .*kcfd				# interposer
16390377SimpUNREF_OBJ	/libpkcs11\.so\.1; .*\ of\ .*libkmf\.so\.1	# interposed
16490377Simp
16590377Simp# Objects that used to contain system functionalty that has since
16690377Simp# migrated to libc. We preserve these libraries as pure filters for
16790377Simp# backward compatability but nothing needs to link to them.
16890377SimpOLDDEP		libaio\.so\.1			# onnv build 44
16990377SimpOLDDEP		libdl\.so\.1			# on10 build 49
17090377SimpOLDDEP		libdoor\.so\.1			# onnv build 12
17190377SimpOLDDEP		libintl\.so\.1			# on297 build 7
17290377SimpOLDDEP		libpthread\.so\.1		# on10 build 53
17390377SimpOLDDEP		librt\.so\.1			# onnv build 44
17490377SimpOLDDEP		libsched\.so\.1			# on10 build 36
17590377SimpOLDDEP		libthread\.so\.1		# on10 build 53
17690377SimpOLDDEP		libw\.so\.1			# on297 build 7
17790377Simp
17890377Simp# Files for which we skip checking of duplicate addresses in the
17990377Simp# symbol sort sections. Such exceptions should be rare --- most code will
18090377Simp# not have duplicate addresses, since it takes assember or a "#pragma weak"
18190377Simp# to do such aliasing in C. C++ is different: The compiler generates aliases
18290377Simp# for implementation reasons, and the mangled names used to encode argument
183# and return value types are difficult to handle well in mapfiles.
184# Furthermore, the Sun compiler and gcc use different and incompatible
185# name mangling conventions. Since ON must be buildable by either, we
186# would have to maintain two sets of mapfiles for each such object.
187# C++ use is rare in ON, so this is not worth pursuing.
188#
189NOSYMSORT	opt/SUNWdtrt/tst/common/pid/tst.weak2.exe	# DTrace test
190NOSYMSORT	lib/amd64/libnsl\.so\.1				# C++
191NOSYMSORT	lib/sparcv9/libnsl\.so\.1			# C++
192NOSYMSORT	lib/sparcv9/libfru\.so\.1			# C++
193NOSYMSORT	usr/lib/sgml/nsgmls				# C++
194NOSYMSORT	usr/lib/lms					# C++
195NOSYMSORT	ld\.so\.1					# libc_pic.a user
196NOSYMSORT	lib/libsun_fc\.so\.1				# C++
197NOSYMSORT	lib/amd64/libsun_fc\.so\.1			# C++
198NOSYMSORT	lib/sparcv9/libsun_fc\.so\.1 			# C++
199
200
201# The libprtdiag_psr.so.1 objects built under usr/src/lib/libprtdiag_psr
202# are a family, all built using the same makefile, targeted at different
203# sparc hardware variants. There are a small number of cases where this
204# one size fits all approach causes an object to be linked against an
205# unneeded library.
206UNREF_OBJ	lib/(libdevinfo|libcfgadm)\.so\.1; .*\ of\ .*SUNW,Netra-CP2300/lib/libprtdiag_psr\.so\.1
207
208
209