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 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
32 Dbg_unused_unref(Rt_map
*lmp
, const char *depend
)
34 if (DBG_NOTCLASS(DBG_C_UNUSED
))
39 dbg_print(LIST(lmp
), MSG_INTL(MSG_USD_UNREF
), NAME(lmp
), depend
);
43 Dbg_unused_sec(Lm_list
*lml
, Is_desc
*isp
)
45 dbg_isec_name_buf_t buf
;
49 if (DBG_NOTCLASS(DBG_C_UNUSED
))
55 * If the file from which this section originates hasn't been referenced
56 * at all, skip this diagnostic, as it would have been covered under
57 * Dbg_unused_file() called from ignore_section_processing().
60 ((isp
->is_file
->ifl_flags
& FLG_IF_FILEREF
) == 0))
63 if (isp
->is_flags
& FLG_IS_DISCARD
)
64 str
= MSG_INTL(MSG_USD_SECDISCARD
);
66 str
= MSG_ORIG(MSG_STR_EMPTY
);
68 dbg_print(lml
, MSG_INTL(MSG_USD_SEC
),
69 dbg_fmt_isec_name(isp
, buf
, &alloc_mem
),
70 EC_XWORD(isp
->is_shdr
->sh_size
), isp
->is_file
->ifl_name
, str
);
75 Dbg_unused_file(Lm_list
*lml
, const char *name
, int needstr
, uint_t cycle
)
77 if (DBG_NOTCLASS(DBG_C_UNUSED
))
81 dbg_print(lml
, MSG_INTL(MSG_USD_NEEDSTR
), name
);
83 dbg_print(lml
, MSG_INTL(MSG_USD_FILECYCLIC
), name
, cycle
);
85 dbg_print(lml
, MSG_INTL(MSG_USD_FILE
), name
);
89 Dbg_unused_path(Lm_list
*lml
, const char *path
, uint_t orig
, uint_t dup
,
94 if (DBG_NOTCLASS(DBG_C_UNUSED
))
99 if (orig
& LA_SER_LIBPATH
) {
100 if (orig
& LA_SER_CONFIG
) {
102 fmt
= MSG_INTL(MSG_DUP_LDLIBPATHC
);
104 fmt
= MSG_INTL(MSG_USD_LDLIBPATHC
);
107 fmt
= MSG_INTL(MSG_DUP_LDLIBPATH
);
109 fmt
= MSG_INTL(MSG_USD_LDLIBPATH
);
111 } else if (orig
& LA_SER_RUNPATH
) {
112 fmt
= MSG_INTL(MSG_USD_RUNPATH
);
116 dbg_print(lml
, fmt
, path
, obj
);