diff options
| author | rie <none@none> | 2007-11-29 08:50:31 -0800 |
|---|---|---|
| committer | rie <none@none> | 2007-11-29 08:50:31 -0800 |
| commit | a194faf8907a6722dcf10ad16c6ca72c9b7bd0ba (patch) | |
| tree | d24cfdf302395bb6cbc356d2192c9e42ba7951ea /usr/src/cmd/sgs/liblddbg | |
| parent | 7a6460b615cb8a60e3de57d76ba619a0a253ff74 (diff) | |
| download | illumos-joyent-a194faf8907a6722dcf10ad16c6ca72c9b7bd0ba.tar.gz | |
6629404 ld with -z ignore doesn't scale
Diffstat (limited to 'usr/src/cmd/sgs/liblddbg')
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/cap.c | 1 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/got.c | 2 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/liblddbg.msg | 15 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/llib-llddbg | 4 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/sections.c | 63 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/syminfo.c | 1 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/syms.c | 22 | ||||
| -rw-r--r-- | usr/src/cmd/sgs/liblddbg/common/version.c | 2 |
8 files changed, 63 insertions, 47 deletions
diff --git a/usr/src/cmd/sgs/liblddbg/common/cap.c b/usr/src/cmd/sgs/liblddbg/common/cap.c index 6659c302cc..43f15883d5 100644 --- a/usr/src/cmd/sgs/liblddbg/common/cap.c +++ b/usr/src/cmd/sgs/liblddbg/common/cap.c @@ -25,6 +25,7 @@ */ #pragma ident "%Z%%M% %I% %E% SMI" +#include <stdio.h> #include <debug.h> #include <libld.h> #include <conv.h> diff --git a/usr/src/cmd/sgs/liblddbg/common/got.c b/usr/src/cmd/sgs/liblddbg/common/got.c index 7494a7a19c..17fe407110 100644 --- a/usr/src/cmd/sgs/liblddbg/common/got.c +++ b/usr/src/cmd/sgs/liblddbg/common/got.c @@ -25,7 +25,7 @@ */ #pragma ident "%Z%%M% %I% %E% SMI" -#include <stdlib.h> +#include <stdio.h> #include "_debug.h" #include "msg.h" #include "libld.h" diff --git a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg index 1f19a9e207..b5b412568c 100644 --- a/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg +++ b/usr/src/cmd/sgs/liblddbg/common/liblddbg.msg @@ -566,12 +566,11 @@ discarded: member of existing group: %s:%s" @ MSG_SEC_STRTAB_STND "strtab=%s; full size: %d; uncompressed" -@ MSG_SEC_STRTAB_COMP "strtab=%s; full size: %d -> compressed down to: %d" -@ MSG_SEC_STRTAB_HD "Compressed String Table: %s \ - [%d buckets]:" -@ MSG_SEC_STRTAB_BCKT " Bucket[%3d]:" -@ MSG_SEC_STRTAB_MSTR " ref[%2d] %s <master>" -@ MSG_SEC_STRTAB_SUFSTR " ref[%2d] %s <suffix of> %s" +@ MSG_SEC_STRTAB_COMP "strtab=%s; full size: %d; compressed down to: %d" +@ MSG_SEC_STRTAB_HD "strtab=%s; compression information [%d buckets]:" +@ MSG_SEC_STRTAB_BCKT " bucket[%d]:" +@ MSG_SEC_STRTAB_MSTR " [%d] %s <master>" +@ MSG_SEC_STRTAB_SUFSTR " [%d] %s <suffix of: %s>" # Unused messages @@ -638,8 +637,10 @@ @ MSG_SYM_ELIMINATING "symbol=%s; eliminating" @ MSG_SYM_NOTELIMINATE "symbol=%s; not eliminated: referenced by \ section=%s, entry[%d]" -@ MSG_SYM_DISCARDED "symbol=%s; discarded because it is part of \ +@ MSG_SYM_DISCARD_SEC "symbol=%s; discarded: originates from unused or \ discarded section=%s from file=%s" +@ MSG_SYM_DISCARD_FILE "symbol=%s; discarded: originates from unused or \ + discarded file=%s" @ MSG_SYM_AOUT "symbol=%s; (original AOUT name)" @ MSG_SYM_LOOKUP "symbol=%s; lookup in file=%s [ %s ]" diff --git a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg b/usr/src/cmd/sgs/liblddbg/common/llib-llddbg index 73122cd337..fbabd9b205 100644 --- a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg +++ b/usr/src/cmd/sgs/liblddbg/common/llib-llddbg @@ -342,8 +342,8 @@ void Dbg32_syms_ar_title(Lm_list *, const char *, int); void Dbg64_syms_ar_title(Lm_list *, const char *, int); void Dbg32_syms_created(Lm_list *, const char *); void Dbg64_syms_created(Lm_list *, const char *); -void Dbg32_syms_discarded(Lm_list *, Sym_desc *, Is_desc *); -void Dbg64_syms_discarded(Lm_list *, Sym_desc *, Is_desc *); +void Dbg32_syms_discarded(Lm_list *, Sym_desc *); +void Dbg64_syms_discarded(Lm_list *, Sym_desc *); void Dbg32_syms_dlsym(Rt_map *, const char *, const char *, int); void Dbg64_syms_dlsym(Rt_map *, const char *, const char *, int); void Dbg32_syms_entered(Ofl_desc *, Sym *, Sym_desc *); diff --git a/usr/src/cmd/sgs/liblddbg/common/sections.c b/usr/src/cmd/sgs/liblddbg/common/sections.c index a88653f084..bd1b76e2de 100644 --- a/usr/src/cmd/sgs/liblddbg/common/sections.c +++ b/usr/src/cmd/sgs/liblddbg/common/sections.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -28,23 +28,12 @@ #include "msg.h" #include "_debug.h" #include "libld.h" - -/* - * Error message string table. - */ -static const Msg order_errors[] = { - MSG_ORD_ERR_INFORANGE, /* MSG_INTL(MSG_ORD_ERR_INFORANGE) */ - MSG_ORD_ERR_ORDER, /* MSG_INTL(MSG_ORD_ERR_ORDER) */ - MSG_ORD_ERR_LINKRANGE, /* MSG_INTL(MSG_ORD_ERR_LINKRANGE) */ - MSG_ORD_ERR_FLAGS, /* MSG_INTL(MSG_ORD_ERR_FLAGS) */ - MSG_ORD_ERR_CYCLIC, /* MSG_INTL(MSG_ORD_ERR_CYCLIC) */ - MSG_ORD_ERR_LINKINV /* MSG_INTL(MSG_ORD_ERR_LINKINV) */ -}; +#include "_string_table.h" void Dbg_sec_strtab(Lm_list *lml, Os_desc *osp, Str_tbl *stp) { - uint_t i; + uint_t cnt; if (DBG_NOTCLASS(DBG_C_STRTAB)) return; @@ -55,10 +44,10 @@ Dbg_sec_strtab(Lm_list *lml, Os_desc *osp, Str_tbl *stp) Dbg_util_nl(lml, DBG_NL_STD); if (stp->st_flags & FLG_STTAB_COMPRESS) dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_COMP), osp->os_name, - stp->st_fullstringsize, stp->st_stringsize); + stp->st_fullstrsize, stp->st_strsize); else dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_STND), osp->os_name, - stp->st_fullstringsize); + stp->st_fullstrsize); if ((DBG_NOTDETAIL()) || ((stp->st_flags & FLG_STTAB_COMPRESS) == 0)) @@ -68,27 +57,31 @@ Dbg_sec_strtab(Lm_list *lml, Os_desc *osp, Str_tbl *stp) dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_HD), osp->os_name, stp->st_hbckcnt); - for (i = 0; i < stp->st_hbckcnt; i++) { - Str_hash *sthash; + for (cnt = 0; cnt < stp->st_hbckcnt; cnt++) { + Str_hash *strhash = stp->st_hashbcks[cnt]; + + if (strhash == 0) + continue; - dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_BCKT), i); + dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_BCKT), cnt); - for (sthash = stp->st_hashbcks[i]; sthash; - sthash = sthash->hi_next) { - uint_t stroff = sthash->hi_mstr->sm_stlen - - sthash->hi_stlen; + while (strhash) { + uint_t stroff = strhash->hi_mstr->sm_strlen - + strhash->hi_strlen; if (stroff == 0) { dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_MSTR), - sthash->hi_refcnt, sthash->hi_mstr->sm_str); + strhash->hi_refcnt, + strhash->hi_mstr->sm_str); } else { dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_SUFSTR), - sthash->hi_refcnt, - &sthash->hi_mstr->sm_str[stroff], - sthash->hi_mstr->sm_str); + strhash->hi_refcnt, + &strhash->hi_mstr->sm_str[stroff], + strhash->hi_mstr->sm_str); } - } + strhash = strhash->hi_next; + } } } @@ -143,7 +136,7 @@ Dbg_sec_created(Lm_list *lml, Os_desc *osp, Sg_desc *sgp) void Dbg_sec_discarded(Lm_list *lml, Is_desc *isp, Is_desc *disp) { - if (DBG_NOTCLASS(DBG_C_SECTIONS)) + if (DBG_NOTCLASS(DBG_C_SECTIONS | DBG_C_UNUSED)) return; dbg_print(lml, MSG_INTL(MSG_SEC_DISCARDED), isp->is_basename, @@ -244,6 +237,18 @@ Dbg_sec_order_list(Ofl_desc *ofl, int flag) Dbg_util_nl(lml, DBG_NL_STD); } +/* + * Error message string table. + */ +static const Msg order_errors[] = { + MSG_ORD_ERR_INFORANGE, /* MSG_INTL(MSG_ORD_ERR_INFORANGE) */ + MSG_ORD_ERR_ORDER, /* MSG_INTL(MSG_ORD_ERR_ORDER) */ + MSG_ORD_ERR_LINKRANGE, /* MSG_INTL(MSG_ORD_ERR_LINKRANGE) */ + MSG_ORD_ERR_FLAGS, /* MSG_INTL(MSG_ORD_ERR_FLAGS) */ + MSG_ORD_ERR_CYCLIC, /* MSG_INTL(MSG_ORD_ERR_CYCLIC) */ + MSG_ORD_ERR_LINKINV /* MSG_INTL(MSG_ORD_ERR_LINKINV) */ +}; + void Dbg_sec_order_error(Lm_list *lml, Ifl_desc *ifl, Word ndx, int error) { diff --git a/usr/src/cmd/sgs/liblddbg/common/syminfo.c b/usr/src/cmd/sgs/liblddbg/common/syminfo.c index f33b78066d..36aeecfe66 100644 --- a/usr/src/cmd/sgs/liblddbg/common/syminfo.c +++ b/usr/src/cmd/sgs/liblddbg/common/syminfo.c @@ -26,6 +26,7 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include <sgs.h> +#include <stdio.h> #include <debug.h> #include <msg.h> diff --git a/usr/src/cmd/sgs/liblddbg/common/syms.c b/usr/src/cmd/sgs/liblddbg/common/syms.c index fd81e514a2..03f302040a 100644 --- a/usr/src/cmd/sgs/liblddbg/common/syms.c +++ b/usr/src/cmd/sgs/liblddbg/common/syms.c @@ -178,20 +178,28 @@ Dbg_syms_spec_title(Lm_list *lml) } void -Dbg_syms_discarded(Lm_list *lml, Sym_desc *sdp, Is_desc *disp) +Dbg_syms_discarded(Lm_list *lml, Sym_desc *sdp) { - const char *sectname; + const char *file; - if (DBG_NOTCLASS(DBG_C_SYMBOLS)) + if (DBG_NOTCLASS(DBG_C_SYMBOLS | DBG_C_UNUSED)) return; if (DBG_NOTDETAIL()) return; - if ((sectname = disp->is_basename) == 0) - sectname = disp->is_name; + if ((sdp->sd_file == NULL) || ((file = sdp->sd_file->ifl_name) == NULL)) + file = MSG_INTL(MSG_STR_UNKNOWN); + + if (sdp->sd_isc) { + const char *sec; - dbg_print(lml, MSG_INTL(MSG_SYM_DISCARDED), - Dbg_demangle_name(sdp->sd_name), sectname, disp->is_file->ifl_name); + if ((sec = sdp->sd_isc->is_basename) == 0) + sec = sdp->sd_isc->is_name; + dbg_print(lml, MSG_INTL(MSG_SYM_DISCARD_SEC), + Dbg_demangle_name(sdp->sd_name), sec, file); + } else + dbg_print(lml, MSG_INTL(MSG_SYM_DISCARD_FILE), + Dbg_demangle_name(sdp->sd_name), file); } void diff --git a/usr/src/cmd/sgs/liblddbg/common/version.c b/usr/src/cmd/sgs/liblddbg/common/version.c index 12fa399e76..914d5d11ec 100644 --- a/usr/src/cmd/sgs/liblddbg/common/version.c +++ b/usr/src/cmd/sgs/liblddbg/common/version.c @@ -25,7 +25,7 @@ */ #pragma ident "%Z%%M% %I% %E% SMI" -#include <link.h> +#include <stdio.h> #include <debug.h> #include "msg.h" #include "_debug.h" |
