4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved.
30 Dbg_libs_audit(Lm_list
*lml
, const char *opath
, const char *npath
)
32 if (DBG_NOTCLASS(DBG_C_LIBS
))
39 dbg_print(lml
, MSG_INTL(MSG_LIB_SKIP
), opath
);
41 dbg_print(lml
, MSG_INTL(MSG_LIB_ALTER
), npath
);
45 Dbg_libs_find(Lm_list
*lml
, const char *name
)
47 if (DBG_NOTCLASS(DBG_C_LIBS
))
50 Dbg_util_nl(lml
, DBG_NL_STD
);
51 dbg_print(lml
, MSG_INTL(MSG_LIB_FIND
), name
);
55 Dbg_libs_found(Lm_list
*lml
, const char *path
, int alter
)
57 if (DBG_NOTCLASS(DBG_C_LIBS
))
60 dbg_print(lml
, MSG_INTL(MSG_LIB_TRYING
), path
, alter
?
61 MSG_INTL(MSG_STR_ALTER
) : MSG_ORIG(MSG_STR_EMPTY
));
65 Dbg_libs_insecure(Lm_list
*lml
, const char *path
, int usable
)
67 if (DBG_NOTCLASS(DBG_C_LIBS
))
71 dbg_print(lml
, MSG_INTL(MSG_LIB_INUSE
), path
);
73 dbg_print(lml
, MSG_INTL(MSG_LIB_IGNORE
), path
);
77 Dbg_lib_dir_print(Lm_list
*lml
, APlist
*libdir
)
82 for (APLIST_TRAVERSE(libdir
, idx
, cp
))
83 dbg_print(lml
, MSG_ORIG(MSG_LIB_FILE
), cp
);
87 Dbg_libs_init(Lm_list
*lml
, APlist
*ulibdir
, APlist
*dlibdir
)
89 if (DBG_NOTCLASS(DBG_C_LIBS
))
92 dbg_print(lml
, MSG_INTL(MSG_LIB_INITPATH
));
93 Dbg_lib_dir_print(lml
, ulibdir
);
94 Dbg_lib_dir_print(lml
, dlibdir
);
98 Dbg_libs_l(Lm_list
*lml
, const char *name
, const char *path
)
100 if (DBG_NOTCLASS(DBG_C_LIBS
))
105 dbg_print(lml
, MSG_INTL(MSG_LIB_LOPT
), name
, path
);
109 Dbg_libs_path(Lm_list
*lml
, const char *path
, uint_t orig
, const char *obj
)
116 if (DBG_NOTCLASS(DBG_C_LIBS
))
120 (LA_SER_LIBPATH
| LA_SER_RUNPATH
| LA_SER_DEFAULT
| LA_SER_SECURE
);
124 if (orig
& LA_SER_CONFIG
)
125 fmt
= MSG_INTL(MSG_LIB_LDLIBPATHC
);
127 fmt
= MSG_INTL(MSG_LIB_LDLIBPATH
);
131 fmt
= MSG_INTL(MSG_LIB_RUNPATH
);
135 if (orig
& LA_SER_CONFIG
)
136 fmt
= MSG_INTL(MSG_LIB_DEFAULTC
);
138 fmt
= MSG_INTL(MSG_LIB_DEFAULT
);
142 if (orig
& LA_SER_CONFIG
)
143 fmt
= MSG_INTL(MSG_LIB_TDEFAULTC
);
145 fmt
= MSG_INTL(MSG_LIB_TDEFAULT
);
152 dbg_print(lml
, fmt
, path
, obj
);
156 Dbg_libs_req(Lm_list
*lml
, const char *so_name
, const char *ref_file
,
159 if (DBG_NOTCLASS(DBG_C_LIBS
))
164 dbg_print(lml
, MSG_INTL(MSG_LIB_REQUIRED
), so_name
, name
, ref_file
);
168 Dbg_libs_update(Lm_list
*lml
, APlist
*ulibdir
, APlist
*dlibdir
)
170 if (DBG_NOTCLASS(DBG_C_LIBS
))
173 dbg_print(lml
, MSG_INTL(MSG_LIB_UPPATH
));
174 Dbg_lib_dir_print(lml
, ulibdir
);
175 Dbg_lib_dir_print(lml
, dlibdir
);
179 Dbg_libs_yp(Lm_list
*lml
, const char *path
)
181 if (DBG_NOTCLASS(DBG_C_LIBS
))
184 dbg_print(lml
, MSG_INTL(MSG_LIB_LIBPATH
), path
);
188 Dbg_libs_ylu(Lm_list
*lml
, const char *path
, const char *orig
, int index
)
190 if (DBG_NOTCLASS(DBG_C_LIBS
))
193 dbg_print(lml
, MSG_INTL(MSG_LIB_YPATH
), path
, orig
,
194 (index
== YLDIR
) ? 'L' : 'U');