/* * If any run-time linker debugging is being carried out always indicate the * fact and specify the point at which we transfer control to the main program. */ void Dbg_util_call_main(Rt_map *lmp) { Lm_list *lml = LIST(lmp); Dbg_util_nl(lml, DBG_NL_FRC); dbg_print(lml, MSG_INTL(MSG_UTL_TRANS), NAME(lmp)); Dbg_util_nl(lml, DBG_NL_FRC); }
void Dbg_util_intoolate(Rt_map *lmp) { Lm_list *lml = LIST(lmp); Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_UTL_INTOOLATE), NAME(lmp)); Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_util_str(Lm_list *lml, const char *str) { Dbg_util_nl(lml, DBG_NL_STD); Dbg_util_nl(lml, DBG_NL_FRC); dbg_print(lml, MSG_ORIG(MSG_FMT_STR), str); Dbg_util_nl(lml, DBG_NL_FRC); Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_util_no_init(Rt_map *lmp) { Lm_list *lml = LIST(lmp); if (DBG_NOTCLASS(DBG_C_INIT)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_UTL_NOINIT), NAME(lmp)); Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_util_broadcast(Rt_map *lmp) { Lm_list *lml = LIST(lmp); if (DBG_NOTCLASS(DBG_C_INIT)) return; if (DBG_NOTDETAIL()) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_UTL_BROAD), NAME(lmp)); Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_statistics_ar(Ofl_desc *ofl) { Aliste idx; Ar_desc *adp; Elf_Arsym *arsym; Ar_aux *aux; Lm_list *lml = ofl->ofl_lml; if (DBG_NOTCLASS(DBG_C_STATS | DBG_C_UNUSED)) return; Dbg_util_nl(lml, DBG_NL_STD); for (APLIST_TRAVERSE(ofl->ofl_ars, idx, adp)) { size_t poffset = 0; uint_t count = 0, used = 0; if ((adp->ad_flags & FLG_ARD_EXTRACT) == 0) { Dbg_unused_file(lml, adp->ad_name, 0, 0); continue; } if (DBG_NOTCLASS(DBG_C_STATS)) continue; arsym = adp->ad_start; aux = adp->ad_aux; while ((arsym != NULL) && (arsym->as_off != NULL)) { /* * Assume that symbols from the same member file are * adjacent within the archive symbol table. */ if (poffset != arsym->as_off) { count++; poffset = arsym->as_off; if (aux->au_mem == FLG_ARMEM_PROC) used++; } aux++, arsym++; } if ((count == 0) || (used == 0)) continue; dbg_print(lml, MSG_INTL(MSG_STATS_AR), adp->ad_name, count, used, ((used * 100) / count)); } Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_audit_lib(Rt_map *clmp, const char *lib, int type) { Lm_list *clml = LIST(clmp); const char *str; if (DBG_NOTCLASS(DBG_C_AUDITING)) return; Dbg_util_nl(clml, DBG_NL_STD); switch (type) { case DBG_AUD_PRELOAD: str = MSG_ORIG(MSG_AUD_PRELOAD); break; case DBG_AUD_GLOBAL: str = MSG_ORIG(MSG_AUD_GLOBAL); break; case DBG_AUD_LOCAL: /* FALLTHROUGH */ default: str = MSG_ORIG(MSG_STR_EMPTY); } dbg_print(clml, MSG_INTL(MSG_AUD_LIB), lib, NAME(clmp), str); }
void Dbg_util_edge_in(Lm_list *lml, Rt_map *clmp, uint_t flags, Rt_map *dlmp, int ndx, int flag) { const char *str; if (DBG_NOTCLASS(DBG_C_INIT)) return; if (DBG_NOTDETAIL()) return; if (flag & RT_SORT_REV) str = MSG_ORIG(MSG_SCN_INIT); else str = MSG_ORIG(MSG_SCN_FINI); if ((clmp == 0) || (ectoggle == 0)) Dbg_util_nl(lml, DBG_NL_STD); if (clmp == 0) { dbg_print(lml, MSG_INTL(MSG_UTL_EDGE_TITLE), str); dbg_print(lml, MSG_INTL(MSG_UTL_EDGE_START), ndx, NAME(dlmp)); } else dbg_print(lml, MSG_INTL(MSG_UTL_EDGE_IN), ndx, NAME(dlmp), NAME(clmp), conv_bnd_type(flags)); ectoggle = 1; }
void Dbg_util_dbnotify(Lm_list *lml, rd_event_e event, r_state_e state) { const char *estr; const char *sstr; if (DBG_NOTCLASS(DBG_C_FILES)) return; if (DBG_NOTDETAIL()) return; switch (event) { case RD_PREINIT: estr = MSG_ORIG(MSG_UTL_EVNT_PREINIT); sstr = MSG_INTL(MSG_STR_NULL); break; case RD_POSTINIT: estr = MSG_ORIG(MSG_UTL_EVNT_POSTINIT); sstr = MSG_INTL(MSG_STR_NULL); break; case RD_DLACTIVITY: estr = MSG_ORIG(MSG_UTL_EVNT_DLACT); switch (state) { case RT_CONSISTENT: sstr = MSG_ORIG(MSG_UTL_STA_CONSIST); break; case RT_ADD: sstr = MSG_ORIG(MSG_UTL_STA_ADD); break; case RT_DELETE: sstr = MSG_ORIG(MSG_UTL_STA_DELETE); break; default: sstr = MSG_INTL(MSG_STR_NULL); break; } break; default: sstr = MSG_INTL(MSG_STR_NULL); estr = MSG_INTL(MSG_STR_UNKNOWN); break; } Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_UTL_DBNOTIFY), estr, sstr); Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_audit_objclose(Lm_list *lml, const char *lib, const char *obj) { if (DBG_NOTCLASS(DBG_C_AUDITING)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_OBJCLOSE), lib, obj); }
void Dbg_audit_interface(Lm_list *lml, const char *lib, const char *interface) { if (DBG_NOTCLASS(DBG_C_AUDITING)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_INTERFACE), lib, interface); }
void Dbg_audit_version(Lm_list *lml, const char *lib, ulong_t version) { if (DBG_NOTCLASS(DBG_C_AUDITING)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_VERSION), lib, (int)version); }
void Dbg_sec_backing(Lm_list *lml) { if (DBG_NOTCLASS(DBG_C_SECTIONS)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_SEC_BACKING)); }
void Dbg_audit_preinit(Lm_list *lml, const char *lib, const char *obj) { if (DBG_NOTCLASS(DBG_C_AUDITING)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_PREINIT), lib, obj); }
void Dbg_sec_strtab(Lm_list *lml, Os_desc *osp, Str_tbl *stp) { uint_t cnt; if (DBG_NOTCLASS(DBG_C_STRTAB)) return; if (!osp) return; 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, EC_XWORD(stp->st_fullstrsize), EC_XWORD(stp->st_strsize)); else dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_STND), osp->os_name, EC_XWORD(stp->st_fullstrsize)); if ((DBG_NOTDETAIL()) || ((stp->st_flags & FLG_STTAB_COMPRESS) == 0)) return; dbg_print(lml, MSG_ORIG(MSG_STR_EMPTY)); dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_HD), osp->os_name, stp->st_hbckcnt); for (cnt = 0; cnt < stp->st_hbckcnt; cnt++) { Str_hash *strhash = stp->st_hashbcks[cnt]; if (strhash == NULL) continue; dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_BCKT), cnt); while (strhash) { size_t stroff = strhash->hi_mstr->sm_strlen - strhash->hi_strlen; if (stroff == 0) { dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_MSTR), EC_XWORD(strhash->hi_refcnt), strhash->hi_mstr->sm_str); } else { dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_SUFSTR), EC_XWORD(strhash->hi_refcnt), &strhash->hi_mstr->sm_str[stroff], strhash->hi_mstr->sm_str); } strhash = strhash->hi_next; } } }
void Dbg_tls_static_resv(Rt_map *lmp, ulong_t size, ulong_t resv) { Lm_list *lml = LIST(lmp); if (DBG_NOTCLASS(DBG_C_TLS)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_TLS_STATBLOCK3), TLSMODID(lmp), NAME(lmp), EC_XWORD(size), EC_XWORD(resv)); }
void Dbg_move_outmove(Lm_list *lml, const char *name) { if (DBG_NOTCLASS(DBG_C_MOVE)) return; if (DBG_NOTDETAIL()) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_MOVE_OUTMOVE), name); dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1)); }
void Dbg_move_parexpn(Lm_list *lml, const char *name, const char *reason) { if (DBG_NOTCLASS(DBG_C_MOVE)) return; if (DBG_NOTDETAIL()) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_MOVE_PAREXPN), name, reason); dbg_print(lml, MSG_INTL(MSG_MOVE_TITLE1)); }
void Dbg_audit_activity(Lm_list *lml, const char *lib, const char *obj, uint_t flags) { Conv_inv_buf_t inv_buf; if (DBG_NOTCLASS(DBG_C_AUDITING)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_ACTIVITY), lib, obj, conv_la_activity(flags, CONV_FMT_ALT_DEFAULT, &inv_buf)); }
void Dbg_util_wait(Rt_map *clmp, Rt_map *dlmp, int what) { Lm_list *lml = LIST(clmp); const char *str; if (DBG_NOTCLASS(DBG_C_INIT)) return; if (DBG_NOTDETAIL()) return; if (what == DBG_WAIT_INIT) str = MSG_ORIG(MSG_SCN_INIT); else if (what == DBG_WAIT_FINI) str = MSG_ORIG(MSG_SCN_FINI); else str = MSG_INTL(MSG_STR_SYMBOL); Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_UTL_WAIT), str, NAME(clmp), NAME(dlmp)); Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_util_call_init(Rt_map *lmp, int flag) { Lm_list *lml = LIST(lmp); const char *str; if (DBG_NOTCLASS(DBG_C_INIT)) return; if (flag == DBG_INIT_SORT) str = MSG_INTL(MSG_UTL_SORT); else if (flag == DBG_INIT_PEND) str = MSG_INTL(MSG_UTL_PEND); else if (flag == DBG_INIT_DYN) str = MSG_INTL(MSG_UTL_DYN); else str = MSG_INTL(MSG_UTL_DONE); Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_UTL_INIT), str, NAME(lmp)); Dbg_util_nl(lml, DBG_NL_STD); }
void Dbg_sec_strtab(Lm_list *lml, Os_desc *osp, Str_tbl *stp) { uint_t i; if (DBG_NOTCLASS(DBG_C_STRTAB)) return; if (!osp) return; 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); else dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_STND), osp->os_name, stp->st_fullstringsize); if ((DBG_NOTDETAIL()) || ((stp->st_flags & FLG_STTAB_COMPRESS) == 0)) return; dbg_print(lml, MSG_ORIG(MSG_STR_EMPTY)); 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; dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_BCKT), i); for (sthash = stp->st_hashbcks[i]; sthash; sthash = sthash->hi_next) { uint_t stroff = sthash->hi_mstr->sm_stlen - sthash->hi_stlen; if (stroff == 0) { dbg_print(lml, MSG_INTL(MSG_SEC_STRTAB_MSTR), sthash->hi_refcnt, sthash->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); } } } }
void Dbg_audit_objfilter(Lm_list *lml, int call, const char *lib, const char *filter, const char *filtee, const char *ref) { if (DBG_NOTCLASS(DBG_C_AUDITING)) return; if (call == DBG_AUD_CALL) { Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_OBJFILTER), lib, filter, filtee, ref); } else dbg_print(lml, MSG_INTL(MSG_AUD_OBJFILTER_R), lib, filter); }
void Dbg_tls_static_block(Lm_list *lml, void *list, ulong_t size, ulong_t resv) { if (DBG_NOTCLASS(DBG_C_TLS)) return; Dbg_util_nl(lml, DBG_NL_STD); if (list) { ulong_t ndx; TLS_modinfo **tlsmodlist; tlsmodlist = (TLS_modinfo **)list; for (ndx = 0; tlsmodlist[ndx]; ndx++) { dbg_print(lml, MSG_INTL(MSG_TLS_STATBLOCK1), ndx, tlsmodlist[ndx]->tm_modname); Dbg_tls_modent(lml, tlsmodlist[ndx]); Dbg_util_nl(lml, DBG_NL_STD); } } dbg_print(lml, MSG_INTL(MSG_TLS_STATBLOCK2), EC_XWORD(size), EC_XWORD(resv)); }
void Dbg_audit_pltenter(Lm_list *lml, int call, const char *lib, const char *name, Addr value) { if (DBG_NOTCLASS(DBG_C_AUDITING)) return; if (call == DBG_AUD_CALL) { Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_PLTENTER), lib, name, EC_XWORD(value)); } else { dbg_print(lml, MSG_INTL(MSG_AUD_PLTENTER_R), lib, name, EC_XWORD(value)); } }
void Dbg_audit_symbind(Lm_list *lml, int call, const char *lib, const char *name, Addr value, uint_t flags) { Conv_la_symbind_buf_t la_symbind_buf; if (DBG_NOTCLASS(DBG_C_AUDITING)) return; if (call == DBG_AUD_CALL) { Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_SYMBIND), lib, name, EC_XWORD(value), conv_la_symbind(flags, &la_symbind_buf)); } else { dbg_print(lml, MSG_INTL(MSG_AUD_SYMBIND_R), lib, name, EC_XWORD(value), conv_la_symbind(flags, &la_symbind_buf)); } }
void Dbg_util_scc_title(Lm_list *lml, int sec) { const char *_sec; if (DBG_NOTCLASS(DBG_C_INIT)) return; if (DBG_NOTDETAIL()) return; if (sec) _sec = MSG_INTL(MSG_UTL_SCC_SUBI); else _sec = MSG_INTL(MSG_UTL_SCC_SUBF); Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_UTL_SCC_TITLE), _sec); }
void Dbg_tls_modactivity(Lm_list *lml, void *vtlsmodent, uint_t flag) { const char *str; TLS_modinfo *tlsmodent; if (DBG_NOTCLASS(DBG_C_TLS)) return; if (flag == TM_FLG_MODADD) str = MSG_INTL(MSG_TLS_ADD); else str = MSG_INTL(MSG_TLS_REMOVE); tlsmodent = (TLS_modinfo *)vtlsmodent; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_TLS_MODACT), str, tlsmodent->tm_modname); Dbg_tls_modent(lml, tlsmodent); }
void Dbg_audit_objopen(Lm_list *lml, int call, const char *lib, const char *obj, uint_t flags, Boolean ignore) { Conv_la_bind_buf_t la_bind_buf; if (DBG_NOTCLASS(DBG_C_AUDITING)) return; if (call == DBG_AUD_CALL) { Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_AUD_OBJOPEN), lib, obj); } else { if (ignore) dbg_print(lml, MSG_INTL(MSG_AUD_OBJOPEN_RI), lib, obj, conv_la_bind(flags, &la_bind_buf)); else dbg_print(lml, MSG_INTL(MSG_AUD_OBJOPEN_R), lib, obj, conv_la_bind(flags, &la_bind_buf)); } }
void Dbg_statistics_ld(Ofl_desc *ofl) { Lm_list *lml = ofl->ofl_lml; if (DBG_NOTCLASS(DBG_C_STATS)) return; Dbg_util_nl(lml, DBG_NL_STD); dbg_print(lml, MSG_INTL(MSG_STATS_GENERAL)); if (ofl->ofl_objscnt || ofl->ofl_soscnt || ofl->ofl_arscnt) { dbg_print(lml, MSG_INTL(MSG_STATS_FILES), EC_XWORD(ofl->ofl_objscnt), EC_XWORD(ofl->ofl_soscnt), EC_XWORD(ofl->ofl_arscnt)); } if (ofl->ofl_locscnt || ofl->ofl_globcnt) { dbg_print(lml, MSG_INTL(MSG_STATS_SYMBOLS_OUT), EC_XWORD(ofl->ofl_globcnt), EC_XWORD(ofl->ofl_locscnt)); } if (ofl->ofl_entercnt || ofl->ofl_scopecnt || ofl->ofl_elimcnt) { dbg_print(lml, MSG_INTL(MSG_STATS_SYMBOLS_IN), EC_XWORD(ofl->ofl_entercnt), EC_XWORD(ofl->ofl_scopecnt), EC_XWORD(ofl->ofl_elimcnt)); } dbg_print(lml, MSG_INTL(MSG_STATS_REL_OUT), EC_XWORD(ofl->ofl_outrels.rc_cnt)); dbg_print(lml, MSG_INTL(MSG_STATS_REL_IN), EC_XWORD(ofl->ofl_entrelscnt), EC_XWORD(ofl->ofl_actrels.rc_cnt)); dbg_print(lml, MSG_INTL(MSG_STATS_REL_TICACHE)); rel_cache_statistics(ofl, MSG_INTL(MSG_STATS_REL_TIOUT), ofl->ofl_outrels.rc_list); rel_cache_statistics(ofl, MSG_INTL(MSG_STATS_REL_TIACT), ofl->ofl_actrels.rc_list); rel_aux_cache_statistics(ofl); }