1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
|
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
# Copyright 2018 Joyent, Inc.
# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
#
# This file provides exceptions to the usual rules applied to ELF objects by
# check_rtime. All strings are Perl regular expressions that are compared to
# file paths. In addition to the standard Perl syntax, there is one extension:
#
# MACH(dir)
#
# is expanded into a regular expression that matches the given
# directory, or a 64-bit subdirectory of the directory with the
# name of a 64-bit architecture. For example, MACH(lib) will match
# any of the following:
#
# lib
# lib/amd64
# lib/sparcv9
# Directory hierarchies to skip completely
SKIP ^usr/lib/libc/ # optimized libc
SKIP ^usr/lib/rcm/ # 4426119
SKIP ^usr/perl5/ # alan's taking care of these :-)
SKIP ^usr/src/ # no objects in source code
# Individual files that we don't examine
SKIP ^boot/grub/bin/grub$
# USIII specific extns. cause ldd noise on USII bld. m/c
SKIP ^usr/lib/fps/sun4u/UltraSPARC.*/fptest$
SKIP ^usr/MACH(lib)/lddstub$ # lddstub has no dependencies
SKIP ^usr/MACH(lib)/libssagent\.so\.1$ # 4328854
SKIP ^usr/lib/MACH(iconv)/geniconvtbl.so$ # 4384329
# picl file exclusions (4385799)
SKIP ^usr/platform/.*/libpsvcplugin_psr\.so\.1
SKIP ^usr/platform/.*/libpsvcpolicy_psr\.so\.1
SKIP ^usr/platform/.*/libpsvcpolicy\.so\.1
SKIP ^usr/lib/sysevent/modules/picl_slm.so$
# Objects that are allowed to have executable data segments
EXEC_DATA ^MACH(lib)/ld\.so\.1$
EXEC_DATA ^lib/libc\.so\.1$ # 6524709, 32-bit, needed for x86 only
EXEC_DATA ^MACH(lib)/libumem\.so\.1$ # ptcumem
EXEC_DATA ^opt/SUNWdtrt/tst/.*/ustack/tst\.helper\.exe$
EXEC_DATA ^platform/.*/MACH(kernel)/unix$
# Objects that are allowed to have an executable stack
EXEC_STACK ^platform/.*/MACH(kernel)/unix$
EXEC_STACK ^platform/.*/multiboot$
EXEC_STACK ^opt/os-tests/tests/secflags/stacky$
# Objects for which we allow relocations to the text segment
TEXTREL ^platform/.*/MACH(kernel)/unix$
TEXTREL ^usr/sbin/bhyve$
# Directories and files that are allowed to have no direct bound symbols
NODIRECT ^platform/.*/MACH(kernel)/unix$
NODIRECT ^usr/ucb
NODIRECT ^usr/4lib/sbcp$
# 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.
NOCRLEALT ^usr/lib/libc/libc_hwcap[1-3].so.1$
# Files that should contain debugging information.
STAB ^platform/.*/MACH(kernel)/unix$
# Files that are allowed undefined references
UNDEF_REF ^usr/lib/libnisdb\.so\.2$
# Objects allowed to have unused dependencies
UNUSED_DEPS ^usr/lib/picl/plugins/ # require devtree dependencies
# libnetsnmphelpers.so is empty in some net-snmp versions
UNUSED_OBJ unused object=.*/libnetsnmphelpers\.so\..*
UNREF_OBJ unreferenced object=.*/libnetsnmphelpers\.so\..*
# Unused runpaths due to dlopen() use
UNUSED_RPATH /usr/lib/fs/autofs.*\ from\ .automountd
UNUSED_RPATH /etc/ppp/plugins.*\ from\ .*pppd
UNUSED_RPATH /usr/lib/inet/ppp.*\ from\ .*pppd
UNUSED_RPATH /usr/platform/.*rsmlib.*\ from\ .*librsm\.so\.2
UNUSED_RPATH \$ORIGIN.*\ from\ .*fcode.so
UNUSED_RPATH /opt/VRTSvxvm/lib.*\ from\ .*libdiskmgt\.so\.1
# Unused runpaths in picl code
UNUSED_RPATH /usr/platform/.*\ from\ .*/usr/platform
UNUSED_RPATH /usr/lib/picl/.*\ from\ .*/usr/platform
UNUSED_RPATH /usr/platform/.*\ from\ .*/usr/lib/picl
# Unused runpaths in non-OSNET objects we can't change
UNUSED_RPATH /usr/lib/mps.*\ from\ .*libnss3\.so
UNUSED_RPATH /usr/lib/mps.*\ from\ .*libnssutil3\.so
UNUSED_RPATH /usr/lib/mps.*\ from\ .*libsmime3\.so
UNUSED_RPATH /usr/lib/mps.*\ from\ .*libssl3\.so
UNUSED_RPATH /usr/lib.*\ from\ .*/usr/lib/mps
UNUSED_RPATH /usr/gnu/lib.*\ from\ .*/usr/lib/libpython2\..
UNUSED_RPATH /usr/gnu/lib.*\ from\ .*/usr/lib/64/libpython2\..
UNUSED_RPATH /usr/gnu/lib.*\ from\ .*/usr/lib/64/libpython3\..
UNUSED_RPATH /usr/snadm/lib.*\ from\ .*/usr/snadm/lib/libspmicommon\.so\.1
UNUSED_RPATH /usr/gcc/.*/lib.*\ from\ .*
# Unused runpaths for reasons not captured above
UNUSED_RPATH /usr/lib/smbsrv.*\ from\ .*libsmb\.so\.1 # future needs
# Unreferenced objects of non-OSnet objects we can't change
UNREF_OBJ /lib.*\ of\ .*libcimapi\.so
UNREF_OBJ /lib.*\ of\ .*libdbus-1\.so\.3
UNREF_OBJ /lib.*\ of\ .*libdbus-glib-1\.so\.2
UNREF_OBJ /lib.*\ of\ .*libgio-2.0\.so\.0
UNREF_OBJ /lib.*\ of\ .*libglib-2.0\.so\.0
UNREF_OBJ /lib.*\ of\ .*libgobject-2.0\.so\.0
UNREF_OBJ /lib.*\ of\ .*libgthread-2\.0\.so\.0
UNREF_OBJ /lib.*\ of\ .*libjvm\.so
UNREF_OBJ /lib.*\ of\ .*libnetsnmp\.so\..*
UNREF_OBJ /lib.*\ of\ .*libnetsnmpagent\.so\..*
UNREF_OBJ /lib.*\ of\ .*libnetsnmpmibs\.so\..*
UNREF_OBJ /lib.*\ of\ .*libnetsnmphelpers\.so\..*
UNREF_OBJ /lib.*\ of\ .*libnspr4\.so
UNREF_OBJ /lib.*\ of\ .*libpq\.so\.5
UNREF_OBJ /lib.*\ of\ .*libsoftokn3\.so
UNREF_OBJ /lib.*\ of\ .*libspmicommon\.so\.1
UNREF_OBJ /lib.*\ of\ .*libspmocommon\.so\.1
UNREF_OBJ /lib.*\ of\ .*libssl3\.so
UNREF_OBJ /lib.*\ of\ .*libtspi\.so\.1
UNREF_OBJ /lib.*\ of\ .*libxml2\.so\.2
UNREF_OBJ /lib.*\ of\ .*libxslt\.so\.1
UNREF_OBJ /lib.*\ of\ .*libpq\.so\.4
UNREF_OBJ /lib.*\ of\ .*libpython2\.4\.so\.1\.0
UNREF_OBJ /lib.*\ of\ .*libpython2\.6\.so\.1\.0
UNREF_OBJ /lib.*\ of\ .*libpython2\.7\.so\.1\.0
UNREF_OBJ /lib.*\ of\ .*libpython3\.[567]m?\.so\.1\.0
UNREF_OBJ /libgcc_s.*\ of\ .*libstdc\+\+\.so\.6
UNREF_OBJ /libgcc_s.*\ of\ .*libgmodule-2\.0\.so\.0
# Unreferenced object of objects we can't change for other reasons
UNREF_OBJ /libmapmalloc\.so\.1;\ unused\ dependency\ of # interposer
UNREF_OBJ /libstdc\+\+\.so\.6;\ unused\ dependency\ of # gcc build
UNREF_OBJ /libgcc_s\.so\.1;\ unused\ dependency\ of # gcc build
UNREF_OBJ /libgcc_s\.so\.1.*\ of\ .*libstdc\+\+\.so\.6 # omnios gcc mix
UNREF_OBJ /libm\.so\.2.*\ of\ .*libstdc\+\+\.so\.6 # gcc build
UNREF_OBJ /lib.*\ of\ .*/lib/picl/plugins/ # picl
UNREF_OBJ /lib.*\ of\ .*kcfd # interposer
UNREF_OBJ /libpkcs11\.so\.1; .*\ of\ .*libkmf\.so\.1 # interposed
# Referenced by the Studio build, not the GCC build. GCC eliminates the unused
# statics which have the dependence.
UNREF_OBJ /libc\.so\.1.*\ of\ .*kldap\.so\.1
# Objects that used to contain system functionalty that has since
# migrated to libc. We preserve these libraries as pure filters for
# backward compatability but nothing needs to link to them.
OLDDEP libaio\.so\.1 # onnv build 44
OLDDEP libdl\.so\.1 # on10 build 49
OLDDEP libdoor\.so\.1 # onnv build 12
OLDDEP libintl\.so\.1 # on297 build 7
OLDDEP libpthread\.so\.1 # on10 build 53
OLDDEP librt\.so\.1 # onnv build 44
OLDDEP libsched\.so\.1 # on10 build 36
OLDDEP libthread\.so\.1 # on10 build 53
OLDDEP libw\.so\.1 # on297 build 7
# Files for which we skip checking of duplicate addresses in the
# symbol sort sections. Such exceptions should be rare --- most code will
# not have duplicate addresses, since it takes assember or a "#pragma weak"
# to do such aliasing in C. C++ is different: The compiler generates aliases
# for implementation reasons, and the mangled names used to encode argument
# and return value types are difficult to handle well in mapfiles.
# Furthermore, the Sun compiler and gcc use different and incompatible
# name mangling conventions. Since illumos must be buildable by either, we
# would have to maintain two sets of mapfiles for each such object.
# C++ use is rare in illumos, so this is not worth pursuing.
#
NOSYMSORT opt/SUNWdtrt/tst/common/pid/tst.weak2.exe # DTrace test
NOSYMSORT ld\.so\.1 # libc_pic.a user
NOSYMSORT usr/bin/audioconvert # C++
NOSYMSORT usr/bin/make # C++
NOSYMSORT usr/MACH(lib)/libsun_fc\.so\.1 # C++
NOSYMSORT usr/MACH(lib)/libfru\.so\.1 # C++
NOSYMSORT usr/lib/libnisdb\.so\.2 # C++
# The majority of illumos deliverables should not depend on the GCC runtime
# (any necessary runtime symbol should be provided by libc.so, instead).
# However, the GNU C++ runtime requires the GCC runtime, so certain objects
# must be excepted.
FORBIDDEN libgcc_s\.so
FORBIDDEN_DEP usr/bin/audioconvert # C++
FORBIDDEN_DEP usr/bin/make # C++
FORBIDDEN_DEP usr/MACH(lib)/libfru.so.1 # C++
FORBIDDEN_DEP usr/MACH(lib)/libsun_fc.so.1 # C++
FORBIDDEN_DEP usr/lib/netsvc/yp/rpc.yppasswdd # C++
FORBIDDEN_DEP usr/lib/netsvc/yp/ypserv # C++
FORBIDDEN_DEP usr/lib/netsvc/yp/ypxfr # C++
FORBIDDEN_DEP usr/lib/netsvc/yp/ypxfrd # C++
# libfakekernel is a test environment, not intended for general use
FORBIDDEN libfakekernel\.so
FORBIDDEN_DEP usr/MACH(lib)/libzpool.so.1
FORBIDDEN_DEP usr/bin/amd64/ztest
FORBIDDEN_DEP usr/bin/i86/ztest
FORBIDDEN_DEP usr/bin/sparcv7/ztest
FORBIDDEN_DEP usr/bin/sparcv9/ztest
FORBIDDEN_DEP usr/lib/MACH(smbfs)/libfknsmb.so.1
FORBIDDEN_DEP usr/lib/MACH(smbfs)/libfksmbfs.so.1
FORBIDDEN_DEP usr/lib/MACH(smbsrv)/libfksmbsrv.so.1
FORBIDDEN_DEP usr/lib/smbsrv/fksmbd
FORBIDDEN_DEP usr/lib/smbsrv/test-msgbuf
FORBIDDEN_DEP usr/lib/smbsrv/testoplock
FORBIDDEN_DEP usr/sbin/amd64/zdb
FORBIDDEN_DEP usr/sbin/i86/zdb
FORBIDDEN_DEP usr/sbin/sparcv7/zdb
FORBIDDEN_DEP usr/sbin/sparcv9/zdb
# libucb is intended for legacy compatibility, not general use
FORBIDDEN libucb\.so
FORBIDDEN_DEP usr/ucb/
FORBIDDEN_DEP usr/ucblib/
# Older versions of libraries only provided for binary compatibility
FORBIDDEN libm\.so\.1
FORBIDDEN libresolv\.so\.1
FORBIDDEN libxcurses\.so\.1
# The libprtdiag_psr.so.1 objects built under usr/src/lib/libprtdiag_psr
# are a family, all built using the same makefile, targeted at different
# sparc hardware variants. There are a small number of cases where this
# one size fits all approach causes an object to be linked against an
# unneeded library.
UNREF_OBJ lib/(libdevinfo|libcfgadm)\.so\.1; .*\ of\ .*SUNW,Netra-CP2300/lib/libprtdiag_psr\.so\.1
|