debug.h revision 178525
1178525Sjb/* 2178525Sjb * CDDL HEADER START 3178525Sjb * 4178525Sjb * The contents of this file are subject to the terms of the 5178525Sjb * Common Development and Distribution License (the "License"). 6178525Sjb * You may not use this file except in compliance with the License. 7178525Sjb * 8178525Sjb * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9178525Sjb * or http://www.opensolaris.org/os/licensing. 10178525Sjb * See the License for the specific language governing permissions 11178525Sjb * and limitations under the License. 12178525Sjb * 13178525Sjb * When distributing Covered Code, include this CDDL HEADER in each 14178525Sjb * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15178525Sjb * If applicable, add the following below this CDDL HEADER, with the 16178525Sjb * fields enclosed by brackets "[]" replaced with your own identifying 17178525Sjb * information: Portions Copyright [yyyy] [name of copyright owner] 18178525Sjb * 19178525Sjb * CDDL HEADER END 20178525Sjb */ 21178525Sjb 22178525Sjb/* 23178525Sjb * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24178525Sjb * Use is subject to license terms. 25178525Sjb */ 26178525Sjb 27178525Sjb#ifndef _DEBUG_H 28178525Sjb#define _DEBUG_H 29178525Sjb 30178525Sjb#pragma ident "%Z%%M% %I% %E% SMI" 31178525Sjb 32178525Sjb/* 33178525Sjb * Global include file for lddbg debugging. 34178525Sjb * 35178525Sjb * ld(1) and ld.so.1(1) carry out all diagnostic debugging calls via lazy 36178525Sjb * loading the library liblddbg.so. Thus debugging is always enabled. The 37178525Sjb * utility elfdump(1) is explicitly dependent upon this library. There are two 38178525Sjb * categories of routines defined in this library: 39178525Sjb * 40178525Sjb * o Debugging routines that have specific linker knowledge, and test the 41178525Sjb * class of debugging allowable before proceeding, start with the `Dbg_' 42178525Sjb * prefix. 43178525Sjb * 44178525Sjb * o Lower level routines that provide generic ELF structure interpretation 45178525Sjb * start with the `Elf_' prefix. These latter routines are the only 46178525Sjb * routines used by the elfdump(1) utility. 47178525Sjb */ 48178525Sjb#include <sgs.h> 49178525Sjb#include <libld.h> 50178525Sjb#include <rtld.h> 51178525Sjb#include <gelf.h> 52178525Sjb 53178525Sjb#ifdef __cplusplus 54178525Sjbextern "C" { 55178525Sjb#endif 56178525Sjb 57178525Sjb/* 58178525Sjb * Define Dbg_*() interface flags. These flags direct the debugging routine to 59178525Sjb * generate different diagnostics, thus the strings themselves are maintained 60178525Sjb * in the debugging library. 61178525Sjb */ 62178525Sjb#define DBG_SUP_ENVIRON 1 63178525Sjb#define DBG_SUP_CMDLINE 2 64178525Sjb#define DBG_SUP_DEFAULT 3 65178525Sjb 66178525Sjb#define DBG_CONF_IGNORE 1 /* configuration processing errors */ 67178525Sjb#define DBG_CONF_VERSION 2 68178525Sjb#define DBG_CONF_PRCFAIL 3 69178525Sjb#define DBG_CONF_CORRUPT 4 70178525Sjb#define DBG_CONF_ABIMISMATCH 5 71178525Sjb 72178525Sjb#define DBG_ORDER_INFO_RANGE 1 /* sh_link out of range */ 73178525Sjb#define DBG_ORDER_INFO_ORDER 2 /* sh_info also ordered */ 74178525Sjb#define DBG_ORDER_LINK_OUTRANGE 3 /* sh_link out of range */ 75178525Sjb#define DBG_ORDER_FLAGS 4 /* sh_flags do not match */ 76178525Sjb#define DBG_ORDER_CYCLIC 5 /* sh_link cyclic */ 77178525Sjb#define DBG_ORDER_LINK_ERROR 6 /* sh_link (one) has an error */ 78178525Sjb 79178525Sjb#define DBG_INIT_SORT 1 /* calling init from sorted order */ 80178525Sjb#define DBG_INIT_PEND 2 /* calling pending init */ 81178525Sjb#define DBG_INIT_DYN 3 /* dynamically triggered init */ 82178525Sjb#define DBG_INIT_DONE 4 /* init completed */ 83178525Sjb 84178525Sjb#define DBG_DLSYM_DEF 0 85178525Sjb#define DBG_DLSYM_NEXT 1 86178525Sjb#define DBG_DLSYM_DEFAULT 2 87178525Sjb#define DBG_DLSYM_SELF 3 88178525Sjb#define DBG_DLSYM_PROBE 4 89178525Sjb#define DBG_DLSYM_SINGLETON 5 90178525Sjb 91178525Sjb#define DBG_DLCLOSE_NULL 0 92178525Sjb#define DBG_DLCLOSE_IGNORE 1 93178525Sjb#define DBG_DLCLOSE_RESCAN 2 94178525Sjb 95178525Sjb#define DBG_WAIT_INIT 1 96178525Sjb#define DBG_WAIT_FINI 2 97178525Sjb#define DBG_WAIT_SYMBOL 3 98178525Sjb 99178525Sjb#define DBG_SYM_REDUCE_GLOBAL 1 /* reporting global symbols to local */ 100178525Sjb#define DBG_SYM_REDUCE_RETAIN 2 /* reporting non reduced local syms */ 101178525Sjb 102178525Sjb/* 103178525Sjb * Group handle operations - passed to Dbg_file_hdl_title(). Indicate why 104178525Sjb * handle dependencies are being manipulated. 105178525Sjb */ 106178525Sjb#define DBG_HDL_CREATE 0 /* handle creation */ 107178525Sjb#define DBG_HDL_ADD 1 /* addition to existing handle */ 108178525Sjb#define DBG_HDL_DELETE 2 /* deletion from a handle */ 109178525Sjb#define DBG_HDL_ORPHAN 3 /* handle being moved to orphan list */ 110178525Sjb#define DBG_HDL_REINST 4 /* handle reinstated from orphan list */ 111178525Sjb 112178525Sjb/* 113178525Sjb * Group handle dependency operations - passed to Dbg_file_hdl_action(). 114178525Sjb * Identify the dependencies that are associated with a handle. 115178525Sjb */ 116178525Sjb#define DBG_DEP_ADD 0 /* dependency added */ 117178525Sjb#define DBG_DEP_UPDATE 1 /* dependency updated */ 118178525Sjb#define DBG_DEP_DELETE 2 /* dependency deleted */ 119178525Sjb#define DBG_DEP_REMOVE 3 /* dependency removed from handle */ 120178525Sjb#define DBG_DEP_REMAIN 4 /* dependency must remain on handle */ 121178525Sjb#define DBG_DEP_ORPHAN 5 /* dependency must remain an orphan */ 122178525Sjb#define DBG_DEP_REINST 6 /* dependency reinstated from orphan */ 123178525Sjb 124178525Sjb/* 125178525Sjb * Binding information, indicating the result of a symbol binding. Can also 126178525Sjb * indicate the reference as being EXTERN or PARENT. Binding information is 127178525Sjb * used to augment diagnostic binding information (which in turn can be used by 128178525Sjb * lari(1)), and to enable ldd(1) -p processing. 129178525Sjb */ 130178525Sjb#define DBG_BINFO_FOUND 0x0001 /* information regarding binding */ 131178525Sjb#define DBG_BINFO_DIRECT 0x0002 /* bound directly */ 132178525Sjb#define DBG_BINFO_COPYREF 0x0004 /* bound to copy relocated reference */ 133178525Sjb#define DBG_BINFO_FILTEE 0x0008 /* bound to filtee */ 134178525Sjb#define DBG_BINFO_INTERPOSE 0x0010 /* bound to an identified interposer */ 135178525Sjb#define DBG_BINFO_PLTADDR 0x0020 /* bound to executables undefined plt */ 136178525Sjb#define DBG_BINFO_MSK 0x0fff 137178525Sjb 138178525Sjb#define DBG_BINFO_REF_EXTERN 0x1000 /* reference to EXTERN */ 139178525Sjb#define DBG_BINFO_REF_PARENT 0x2000 /* reference to PARENT */ 140178525Sjb#define DBG_BINFO_REF_MSK 0xf000 141178525Sjb 142178525Sjb 143178525Sjb#define DBG_CAP_INITIAL 0 144178525Sjb#define DBG_CAP_IGNORE 1 145178525Sjb#define DBG_CAP_OLD 2 146178525Sjb#define DBG_CAP_NEW 3 147178525Sjb#define DBG_CAP_RESOLVED 4 148178525Sjb 149178525Sjb#define DBG_REL_START 1 150178525Sjb#define DBG_REL_FINISH 2 151178525Sjb#define DBG_REL_NONE 3 152178525Sjb 153178525Sjb#define DBG_NL_STD 0 /* newline controllers - standard and */ 154178525Sjb#define DBG_NL_FRC 2 /* forced. */ 155178525Sjb 156178525Sjb#define DBG_BNDREJ_NODIR 0 /* bind rejected, direct to nodirect */ 157178525Sjb#define DBG_BNDREJ_SINGLE 1 /* bind rejected, singleton without */ 158178525Sjb /* default search model */ 159178525Sjb#define DBG_BNDREJ_NUM DBG_BNDREJ_SINGLE 160178525Sjb 161178525Sjb/* 162178525Sjb * Define a debug descriptor, and a user macro that inspects the descriptor as 163178525Sjb * a means of triggering a class of diagnostic output. 164178525Sjb */ 165178525Sjbtypedef struct { 166178525Sjb uint_t d_class; /* debugging classes */ 167178525Sjb uint_t d_extra; /* extra information for classes */ 168178525Sjb APlist *d_list; /* associated strings */ 169178525Sjb} Dbg_desc; 170178525Sjb 171178525Sjbextern Dbg_desc *dbg_desc; 172178525Sjb 173178525Sjb#define DBG_ENABLED (dbg_desc->d_class) 174178525Sjb#define DBG_CALL(func) if (DBG_ENABLED) func 175178525Sjb 176178525Sjb/* 177178525Sjb * Most debugging tokens are interpreted within liblddbg, and thus any flags 178178525Sjb * within d_class are only meaningful to this library. The following flags 179178525Sjb * extend the d_class diagnostic, and are maintained in d_extra. These flags 180178525Sjb * may be interpreted by the debugging library itself or from the callers 181178525Sjb * dbg_print() routine. 182178525Sjb */ 183178525Sjb#define DBG_E_DETAIL 0x0001 /* add detail to a class */ 184178525Sjb#define DBG_E_LONG 0x0002 /* use long names (ie. no truncation) */ 185178525Sjb 186178525Sjb#define DBG_E_STDNL 0x0010 /* standard newline indicator */ 187178525Sjb 188178525Sjb#define DBG_E_SNAME 0x0100 /* prepend simple name (ld only) */ 189178525Sjb#define DBG_E_FNAME 0x0200 /* prepend full name (ld only) */ 190178525Sjb#define DBG_E_CLASS 0x0400 /* prepend ELF class (ld only) */ 191178525Sjb#define DBG_E_LMID 0x0800 /* prepend link-map id (ld.so.1 only) */ 192178525Sjb#define DBG_E_DEMANGLE 0x1000 /* demangle symbol names */ 193178525Sjb 194178525Sjb#define DBG_NOTDETAIL() !(dbg_desc->d_extra & DBG_E_DETAIL) 195178525Sjb#define DBG_NOTLONG() !(dbg_desc->d_extra & DBG_E_LONG) 196178525Sjb 197178525Sjb#define DBG_ISSNAME() (dbg_desc->d_extra & DBG_E_SNAME) 198178525Sjb#define DBG_ISFNAME() (dbg_desc->d_extra & DBG_E_FNAME) 199178525Sjb#define DBG_ISCLASS() (dbg_desc->d_extra & DBG_E_CLASS) 200178525Sjb#define DBG_ISLMID() (dbg_desc->d_extra & DBG_E_LMID) 201178525Sjb#define DBG_ISDEMANGLE() \ 202178525Sjb (dbg_desc->d_extra & DBG_E_DEMANGLE) 203178525Sjb 204178525Sjb/* 205178525Sjb * Print routine, this must be supplied by the application. The initial 206178525Sjb * argument may provide a link-map list to associate with the format statement 207178525Sjb * that follows. 208178525Sjb */ 209178525Sjb/* PRINTFLIKE2 */ 210178525Sjbextern void dbg_print(Lm_list *, const char *, ...); 211178525Sjb 212178525Sjbextern uintptr_t Dbg_setup(const char *, Dbg_desc *); 213178525Sjb 214178525Sjb/* 215178525Sjb * Establish ELF32 and ELF64 class Dbg_*() interfaces. 216178525Sjb */ 217178525Sjb#if defined(_ELF64) 218178525Sjb 219178525Sjb#define Dbg_demangle_name Dbg64_demangle_name 220178525Sjb 221178525Sjb#define Dbg_bind_global Dbg64_bind_global 222178525Sjb#define Dbg_bind_plt_summary Dbg64_bind_plt_summary 223178525Sjb#define Dbg_bind_pltpad_from Dbg64_bind_pltpad_from 224178525Sjb#define Dbg_bind_pltpad_to Dbg64_bind_pltpad_to 225178525Sjb#define Dbg_bind_reject Dbg64_bind_reject 226178525Sjb#define Dbg_bind_weak Dbg64_bind_weak 227178525Sjb 228178525Sjb#define Dbg_cap_val_hw1 Dbg64_cap_val_hw1 229178525Sjb#define Dbg_cap_hw_candidate Dbg64_cap_hw_candidate 230178525Sjb#define Dbg_cap_hw_filter Dbg64_cap_hw_filter 231178525Sjb#define Dbg_cap_mapfile Dbg64_cap_mapfile 232178525Sjb#define Dbg_cap_sec_entry Dbg64_cap_sec_entry 233178525Sjb#define Dbg_cap_sec_title Dbg64_cap_sec_title 234178525Sjb 235178525Sjb#define Dbg_ent_entry Dbg64_ent_entry 236178525Sjb#define Dbg_ent_print Dbg64_ent_print 237178525Sjb 238178525Sjb#define Dbg_file_analyze Dbg64_file_analyze 239178525Sjb#define Dbg_file_aout Dbg64_file_aout 240178525Sjb#define Dbg_file_ar Dbg64_file_ar 241178525Sjb#define Dbg_file_ar_rescan Dbg64_file_ar_rescan 242178525Sjb#define Dbg_file_bind_entry Dbg64_file_bind_entry 243178525Sjb#define Dbg_file_bindings Dbg64_file_bindings 244178525Sjb#define Dbg_file_cleanup Dbg64_file_cleanup 245178525Sjb#define Dbg_file_cntl Dbg64_file_cntl 246178525Sjb#define Dbg_file_config_dis Dbg64_file_config_dis 247178525Sjb#define Dbg_file_config_obj Dbg64_file_config_obj 248178525Sjb#define Dbg_file_del_rescan Dbg64_file_del_rescan 249178525Sjb#define Dbg_file_delete Dbg64_file_delete 250178525Sjb#define Dbg_file_dlclose Dbg64_file_dlclose 251178525Sjb#define Dbg_file_dldump Dbg64_file_dldump 252178525Sjb#define Dbg_file_dlopen Dbg64_file_dlopen 253178525Sjb#define Dbg_file_elf Dbg64_file_elf 254178525Sjb#define Dbg_file_filtee Dbg64_file_filtee 255178525Sjb#define Dbg_file_filter Dbg64_file_filter 256178525Sjb#define Dbg_file_fixname Dbg64_file_fixname 257178525Sjb#define Dbg_file_generic Dbg64_file_generic 258178525Sjb#define Dbg_file_hdl_action Dbg64_file_hdl_action 259178525Sjb#define Dbg_file_hdl_collect Dbg64_file_hdl_collect 260178525Sjb#define Dbg_file_hdl_title Dbg64_file_hdl_title 261178525Sjb#define Dbg_file_lazyload Dbg64_file_lazyload 262178525Sjb#define Dbg_file_ldso Dbg64_file_ldso 263178525Sjb#define Dbg_file_mode_promote Dbg64_file_mode_promote 264178525Sjb#define Dbg_file_modified Dbg64_file_modified 265178525Sjb#define Dbg_file_needed Dbg64_file_needed 266178525Sjb#define Dbg_file_output Dbg64_file_output 267178525Sjb#define Dbg_file_preload Dbg64_file_preload 268178525Sjb#define Dbg_file_prot Dbg64_file_prot 269178525Sjb#define Dbg_file_rejected Dbg64_file_rejected 270178525Sjb#define Dbg_file_reuse Dbg64_file_reuse 271178525Sjb#define Dbg_file_skip Dbg64_file_skip 272178525Sjb 273178525Sjb#define Dbg_got_display Dbg64_got_display 274178525Sjb 275178525Sjb#define Dbg_libs_audit Dbg64_libs_audit 276178525Sjb#define Dbg_libs_find Dbg64_libs_find 277178525Sjb#define Dbg_libs_found Dbg64_libs_found 278178525Sjb#define Dbg_libs_ignore Dbg64_libs_ignore 279178525Sjb#define Dbg_libs_init Dbg64_libs_init 280178525Sjb#define Dbg_libs_l Dbg64_libs_l 281178525Sjb#define Dbg_libs_path Dbg64_libs_path 282178525Sjb#define Dbg_libs_req Dbg64_libs_req 283178525Sjb#define Dbg_libs_update Dbg64_libs_update 284178525Sjb#define Dbg_libs_yp Dbg64_libs_yp 285178525Sjb#define Dbg_libs_ylu Dbg64_libs_ylu 286178525Sjb 287178525Sjb#define Dbg_map_dash Dbg64_map_dash 288178525Sjb#define Dbg_map_ent Dbg64_map_ent 289178525Sjb#define Dbg_map_parse Dbg64_map_parse 290178525Sjb#define Dbg_map_pipe Dbg64_map_pipe 291178525Sjb#define Dbg_map_seg Dbg64_map_seg 292178525Sjb#define Dbg_map_set_atsign Dbg64_map_set_atsign 293178525Sjb#define Dbg_map_set_equal Dbg64_map_set_equal 294178525Sjb#define Dbg_map_size_new Dbg64_map_size_new 295178525Sjb#define Dbg_map_size_old Dbg64_map_size_old 296178525Sjb#define Dbg_map_sort_fini Dbg64_map_sort_fini 297178525Sjb#define Dbg_map_sort_orig Dbg64_map_sort_orig 298178525Sjb#define Dbg_map_symbol Dbg64_map_symbol 299178525Sjb#define Dbg_map_version Dbg64_map_version 300178525Sjb 301178525Sjb#define Dbg_move_adjexpandreloc Dbg64_move_adjexpandreloc 302178525Sjb#define Dbg_move_adjmovereloc Dbg64_move_adjmovereloc 303178525Sjb#define Dbg_move_data Dbg64_move_data 304178525Sjb#define Dbg_move_entry1 Dbg64_move_entry1 305178525Sjb#define Dbg_move_entry2 Dbg64_move_entry2 306178525Sjb#define Dbg_move_expand Dbg64_move_expand 307178525Sjb#define Dbg_move_input Dbg64_move_input 308178525Sjb#define Dbg_move_outmove Dbg64_move_outmove 309178525Sjb#define Dbg_move_outsctadj Dbg64_move_outsctadj 310178525Sjb#define Dbg_move_parexpn Dbg64_move_parexpn 311178525Sjb 312178525Sjb#define Dbg_reloc_apply_reg Dbg64_reloc_apply_reg 313178525Sjb#define Dbg_reloc_apply_val Dbg64_reloc_apply_val 314178525Sjb#define Dbg_reloc_ars_entry Dbg64_reloc_ars_entry 315178525Sjb#define Dbg_reloc_copy Dbg64_reloc_copy 316178525Sjb#define Dbg_reloc_discard Dbg64_reloc_discard 317178525Sjb#define Dbg_reloc_doact Dbg64_reloc_doact 318178525Sjb#define Dbg_reloc_doact_title Dbg64_reloc_doact_title 319178525Sjb#define Dbg_reloc_dooutrel Dbg64_reloc_dooutrel 320178525Sjb#define Dbg_reloc_entry Dbg64_reloc_entry 321178525Sjb#define Dbg_reloc_error Dbg64_reloc_error 322178525Sjb#define Dbg_reloc_generate Dbg64_reloc_generate 323178525Sjb#define Dbg_reloc_in Dbg64_reloc_in 324178525Sjb#define Dbg_reloc_ors_entry Dbg64_reloc_ors_entry 325178525Sjb#define Dbg_reloc_out Dbg64_reloc_out 326178525Sjb#define Dbg_reloc_proc Dbg64_reloc_proc 327178525Sjb#define Dbg_reloc_run Dbg64_reloc_run 328178525Sjb#define Dbg_reloc_transition Dbg64_reloc_transition 329178525Sjb#define Dbg_reloc_sloppycomdat Dbg64_reloc_sloppycomdat 330178525Sjb 331178525Sjb#define Dbg_sec_added Dbg64_sec_added 332178525Sjb#define Dbg_sec_created Dbg64_sec_created 333178525Sjb#define Dbg_sec_discarded Dbg64_sec_discarded 334178525Sjb#define Dbg_sec_genstr_compress Dbg64_sec_genstr_compress 335178525Sjb#define Dbg_sec_group Dbg64_sec_group 336178525Sjb#define Dbg_sec_in Dbg64_sec_in 337178525Sjb#define Dbg_sec_order_error Dbg64_sec_order_error 338178525Sjb#define Dbg_sec_order_list Dbg64_sec_order_list 339178525Sjb#define Dbg_sec_strtab Dbg64_sec_strtab 340178525Sjb#define Dbg_sec_unsup_strmerge Dbg64_sec_unsup_strmerge 341178525Sjb 342178525Sjb#define Dbg_seg_desc_entry Dbg64_seg_desc_entry 343178525Sjb#define Dbg_seg_entry Dbg64_seg_entry 344178525Sjb#define Dbg_seg_list Dbg64_seg_list 345178525Sjb#define Dbg_seg_os Dbg64_seg_os 346178525Sjb#define Dbg_seg_title Dbg64_seg_title 347178525Sjb 348178525Sjb#define Dbg_shdr_modified Dbg64_shdr_modified 349178525Sjb 350178525Sjb#define Dbg_statistics_ar Dbg64_statistics_ar 351178525Sjb#define Dbg_statistics_ld Dbg64_statistics_ld 352178525Sjb 353178525Sjb#define Dbg_support_action Dbg64_support_action 354178525Sjb#define Dbg_support_load Dbg64_support_load 355178525Sjb#define Dbg_support_req Dbg64_support_req 356178525Sjb 357178525Sjb#define Dbg_syminfo_entry Dbg64_syminfo_entry 358178525Sjb#define Dbg_syminfo_title Dbg64_syminfo_title 359178525Sjb 360178525Sjb#define Dbg_syms_ar_checking Dbg64_syms_ar_checking 361178525Sjb#define Dbg_syms_ar_entry Dbg64_syms_ar_entry 362178525Sjb#define Dbg_syms_ar_resolve Dbg64_syms_ar_resolve 363178525Sjb#define Dbg_syms_ar_title Dbg64_syms_ar_title 364178525Sjb#define Dbg_syms_created Dbg64_syms_created 365178525Sjb#define Dbg_syms_discarded Dbg64_syms_discarded 366178525Sjb#define Dbg_syms_dlsym Dbg64_syms_dlsym 367178525Sjb#define Dbg_syms_dup_sort_addr Dbg64_syms_dup_sort_addr 368178525Sjb#define Dbg_syms_entered Dbg64_syms_entered 369178525Sjb#define Dbg_syms_entry Dbg64_syms_entry 370178525Sjb#define Dbg_syms_global Dbg64_syms_global 371178525Sjb#define Dbg_syms_ignore Dbg64_syms_ignore 372178525Sjb#define Dbg_syms_ignore_gnuver Dbg64_syms_ignore_gnuver 373178525Sjb#define Dbg_syms_lazy_rescan Dbg64_syms_lazy_rescan 374178525Sjb#define Dbg_syms_lookup Dbg64_syms_lookup 375178525Sjb#define Dbg_syms_new Dbg64_syms_new 376178525Sjb#define Dbg_syms_old Dbg64_syms_old 377178525Sjb#define Dbg_syms_process Dbg64_syms_process 378178525Sjb#define Dbg_syms_reduce Dbg64_syms_reduce 379178525Sjb#define Dbg_syms_reloc Dbg64_syms_reloc 380178525Sjb#define Dbg_syms_resolved Dbg64_syms_resolved 381178525Sjb#define Dbg_syms_resolving Dbg64_syms_resolving 382178525Sjb#define Dbg_syms_sec_entry Dbg64_syms_sec_entry 383178525Sjb#define Dbg_syms_sec_title Dbg64_syms_sec_title 384178525Sjb#define Dbg_syms_spec_title Dbg64_syms_spec_title 385178525Sjb#define Dbg_syms_updated Dbg64_syms_updated 386178525Sjb#define Dbg_syms_up_title Dbg64_syms_up_title 387178525Sjb 388178525Sjb#define Dbg_util_broadcast Dbg64_util_broadcast 389178525Sjb#define Dbg_util_call_array Dbg64_util_call_array 390178525Sjb#define Dbg_util_call_fini Dbg64_util_call_fini 391178525Sjb#define Dbg_util_call_init Dbg64_util_call_init 392178525Sjb#define Dbg_util_call_main Dbg64_util_call_main 393178525Sjb#define Dbg_util_collect Dbg64_util_collect 394178525Sjb#define Dbg_util_dbnotify Dbg64_util_dbnotify 395178525Sjb#define Dbg_util_edge_in Dbg64_util_edge_in 396178525Sjb#define Dbg_util_edge_out Dbg64_util_edge_out 397178525Sjb#define Dbg_util_intoolate Dbg64_util_intoolate 398178525Sjb#define Dbg_util_lcinterface Dbg64_util_lcinterface 399178525Sjb#define Dbg_util_nl Dbg64_util_nl 400178525Sjb#define Dbg_util_no_init Dbg64_util_no_init 401178525Sjb#define Dbg_util_scc_entry Dbg64_util_scc_entry 402178525Sjb#define Dbg_util_scc_title Dbg64_util_scc_title 403178525Sjb#define Dbg_util_str Dbg64_util_str 404178525Sjb#define Dbg_util_wait Dbg64_util_wait 405178525Sjb 406178525Sjb#define Dbg_unused_file Dbg64_unused_file 407178525Sjb#define Dbg_unused_lcinterface Dbg64_unused_lcinterface 408178525Sjb#define Dbg_unused_path Dbg64_unused_path 409178525Sjb#define Dbg_unused_sec Dbg64_unused_sec 410178525Sjb#define Dbg_unused_unref Dbg64_unused_unref 411178525Sjb 412178525Sjb#define Dbg_ver_avail_entry Dbg64_ver_avail_entry 413178525Sjb#define Dbg_ver_avail_title Dbg64_ver_avail_title 414178525Sjb#define Dbg_ver_def_title Dbg64_ver_def_title 415178525Sjb#define Dbg_ver_desc_entry Dbg64_ver_desc_entry 416178525Sjb#define Dbg_ver_need_entry Dbg64_ver_need_entry 417178525Sjb#define Dbg_ver_need_title Dbg64_ver_need_title 418178525Sjb#define Dbg_ver_nointerface Dbg64_ver_nointerface 419178525Sjb#define Dbg_ver_symbol Dbg64_ver_symbol 420178525Sjb 421178525Sjb#else 422178525Sjb 423178525Sjb#define Dbg_demangle_name Dbg32_demangle_name 424178525Sjb 425178525Sjb#define Dbg_bind_global Dbg32_bind_global 426178525Sjb#define Dbg_bind_plt_summary Dbg32_bind_plt_summary 427178525Sjb#define Dbg_bind_reject Dbg32_bind_reject 428178525Sjb#define Dbg_bind_weak Dbg32_bind_weak 429178525Sjb 430178525Sjb#define Dbg_cap_val_hw1 Dbg32_cap_val_hw1 431178525Sjb#define Dbg_cap_hw_candidate Dbg32_cap_hw_candidate 432178525Sjb#define Dbg_cap_hw_filter Dbg32_cap_hw_filter 433178525Sjb#define Dbg_cap_mapfile Dbg32_cap_mapfile 434178525Sjb#define Dbg_cap_sec_entry Dbg32_cap_sec_entry 435178525Sjb#define Dbg_cap_sec_title Dbg32_cap_sec_title 436178525Sjb 437178525Sjb#define Dbg_ent_entry Dbg32_ent_entry 438178525Sjb#define Dbg_ent_print Dbg32_ent_print 439178525Sjb 440178525Sjb#define Dbg_file_analyze Dbg32_file_analyze 441178525Sjb#define Dbg_file_aout Dbg32_file_aout 442178525Sjb#define Dbg_file_ar Dbg32_file_ar 443178525Sjb#define Dbg_file_ar_rescan Dbg32_file_ar_rescan 444178525Sjb#define Dbg_file_bind_entry Dbg32_file_bind_entry 445178525Sjb#define Dbg_file_bindings Dbg32_file_bindings 446178525Sjb#define Dbg_file_cleanup Dbg32_file_cleanup 447178525Sjb#define Dbg_file_cntl Dbg32_file_cntl 448178525Sjb#define Dbg_file_config_dis Dbg32_file_config_dis 449178525Sjb#define Dbg_file_config_obj Dbg32_file_config_obj 450178525Sjb#define Dbg_file_del_rescan Dbg32_file_del_rescan 451178525Sjb#define Dbg_file_delete Dbg32_file_delete 452178525Sjb#define Dbg_file_dlclose Dbg32_file_dlclose 453178525Sjb#define Dbg_file_dldump Dbg32_file_dldump 454178525Sjb#define Dbg_file_dlopen Dbg32_file_dlopen 455178525Sjb#define Dbg_file_elf Dbg32_file_elf 456178525Sjb#define Dbg_file_filtee Dbg32_file_filtee 457178525Sjb#define Dbg_file_filter Dbg32_file_filter 458178525Sjb#define Dbg_file_fixname Dbg32_file_fixname 459178525Sjb#define Dbg_file_generic Dbg32_file_generic 460178525Sjb#define Dbg_file_hdl_action Dbg32_file_hdl_action 461178525Sjb#define Dbg_file_hdl_collect Dbg32_file_hdl_collect 462178525Sjb#define Dbg_file_hdl_title Dbg32_file_hdl_title 463178525Sjb#define Dbg_file_lazyload Dbg32_file_lazyload 464178525Sjb#define Dbg_file_ldso Dbg32_file_ldso 465178525Sjb#define Dbg_file_mode_promote Dbg32_file_mode_promote 466178525Sjb#define Dbg_file_modified Dbg32_file_modified 467178525Sjb#define Dbg_file_needed Dbg32_file_needed 468178525Sjb#define Dbg_file_output Dbg32_file_output 469178525Sjb#define Dbg_file_preload Dbg32_file_preload 470178525Sjb#define Dbg_file_prot Dbg32_file_prot 471178525Sjb#define Dbg_file_rejected Dbg32_file_rejected 472178525Sjb#define Dbg_file_reuse Dbg32_file_reuse 473178525Sjb#define Dbg_file_skip Dbg32_file_skip 474178525Sjb 475178525Sjb#define Dbg_got_display Dbg32_got_display 476178525Sjb 477178525Sjb#define Dbg_libs_audit Dbg32_libs_audit 478178525Sjb#define Dbg_libs_find Dbg32_libs_find 479178525Sjb#define Dbg_libs_found Dbg32_libs_found 480178525Sjb#define Dbg_libs_ignore Dbg32_libs_ignore 481178525Sjb#define Dbg_libs_init Dbg32_libs_init 482178525Sjb#define Dbg_libs_l Dbg32_libs_l 483178525Sjb#define Dbg_libs_path Dbg32_libs_path 484178525Sjb#define Dbg_libs_req Dbg32_libs_req 485178525Sjb#define Dbg_libs_update Dbg32_libs_update 486178525Sjb#define Dbg_libs_yp Dbg32_libs_yp 487178525Sjb#define Dbg_libs_ylu Dbg32_libs_ylu 488178525Sjb 489178525Sjb#define Dbg_map_dash Dbg32_map_dash 490178525Sjb#define Dbg_map_ent Dbg32_map_ent 491178525Sjb#define Dbg_map_parse Dbg32_map_parse 492178525Sjb#define Dbg_map_pipe Dbg32_map_pipe 493178525Sjb#define Dbg_map_seg Dbg32_map_seg 494178525Sjb#define Dbg_map_set_atsign Dbg32_map_set_atsign 495178525Sjb#define Dbg_map_set_equal Dbg32_map_set_equal 496178525Sjb#define Dbg_map_size_new Dbg32_map_size_new 497178525Sjb#define Dbg_map_size_old Dbg32_map_size_old 498178525Sjb#define Dbg_map_sort_fini Dbg32_map_sort_fini 499178525Sjb#define Dbg_map_sort_orig Dbg32_map_sort_orig 500178525Sjb#define Dbg_map_symbol Dbg32_map_symbol 501178525Sjb#define Dbg_map_version Dbg32_map_version 502178525Sjb 503178525Sjb#define Dbg_move_adjexpandreloc Dbg32_move_adjexpandreloc 504178525Sjb#define Dbg_move_adjmovereloc Dbg32_move_adjmovereloc 505178525Sjb#define Dbg_move_data Dbg32_move_data 506178525Sjb#define Dbg_move_entry1 Dbg32_move_entry1 507178525Sjb#define Dbg_move_entry2 Dbg32_move_entry2 508178525Sjb#define Dbg_move_expand Dbg32_move_expand 509178525Sjb#define Dbg_move_input Dbg32_move_input 510178525Sjb#define Dbg_move_outmove Dbg32_move_outmove 511178525Sjb#define Dbg_move_outsctadj Dbg32_move_outsctadj 512178525Sjb#define Dbg_move_parexpn Dbg32_move_parexpn 513178525Sjb 514178525Sjb#define Dbg_reloc_apply_reg Dbg32_reloc_apply_reg 515178525Sjb#define Dbg_reloc_apply_val Dbg32_reloc_apply_val 516178525Sjb#define Dbg_reloc_ars_entry Dbg32_reloc_ars_entry 517178525Sjb#define Dbg_reloc_copy Dbg32_reloc_copy 518178525Sjb#define Dbg_reloc_discard Dbg32_reloc_discard 519178525Sjb#define Dbg_reloc_doact Dbg32_reloc_doact 520178525Sjb#define Dbg_reloc_doact_title Dbg32_reloc_doact_title 521178525Sjb#define Dbg_reloc_dooutrel Dbg32_reloc_dooutrel 522178525Sjb#define Dbg_reloc_entry Dbg32_reloc_entry 523178525Sjb#define Dbg_reloc_error Dbg32_reloc_error 524178525Sjb#define Dbg_reloc_generate Dbg32_reloc_generate 525178525Sjb#define Dbg_reloc_in Dbg32_reloc_in 526178525Sjb#define Dbg_reloc_ors_entry Dbg32_reloc_ors_entry 527178525Sjb#define Dbg_reloc_out Dbg32_reloc_out 528178525Sjb#define Dbg_reloc_proc Dbg32_reloc_proc 529178525Sjb#define Dbg_reloc_run Dbg32_reloc_run 530178525Sjb#define Dbg_reloc_transition Dbg32_reloc_transition 531178525Sjb#define Dbg_reloc_sloppycomdat Dbg32_reloc_sloppycomdat 532178525Sjb 533178525Sjb#define Dbg_sec_added Dbg32_sec_added 534178525Sjb#define Dbg_sec_created Dbg32_sec_created 535178525Sjb#define Dbg_sec_discarded Dbg32_sec_discarded 536178525Sjb#define Dbg_sec_genstr_compress Dbg32_sec_genstr_compress 537178525Sjb#define Dbg_sec_group Dbg32_sec_group 538178525Sjb#define Dbg_sec_in Dbg32_sec_in 539178525Sjb#define Dbg_sec_order_error Dbg32_sec_order_error 540178525Sjb#define Dbg_sec_order_list Dbg32_sec_order_list 541178525Sjb#define Dbg_sec_strtab Dbg32_sec_strtab 542178525Sjb#define Dbg_sec_unsup_strmerge Dbg32_sec_unsup_strmerge 543178525Sjb 544178525Sjb#define Dbg_seg_desc_entry Dbg32_seg_desc_entry 545178525Sjb#define Dbg_seg_entry Dbg32_seg_entry 546178525Sjb#define Dbg_seg_list Dbg32_seg_list 547178525Sjb#define Dbg_seg_os Dbg32_seg_os 548178525Sjb#define Dbg_seg_title Dbg32_seg_title 549178525Sjb 550178525Sjb#define Dbg_shdr_modified Dbg32_shdr_modified 551178525Sjb 552178525Sjb#define Dbg_statistics_ar Dbg32_statistics_ar 553178525Sjb#define Dbg_statistics_ld Dbg32_statistics_ld 554178525Sjb 555178525Sjb#define Dbg_support_action Dbg32_support_action 556178525Sjb#define Dbg_support_load Dbg32_support_load 557178525Sjb#define Dbg_support_req Dbg32_support_req 558178525Sjb 559178525Sjb#define Dbg_syminfo_entry Dbg32_syminfo_entry 560178525Sjb#define Dbg_syminfo_title Dbg32_syminfo_title 561178525Sjb 562178525Sjb#define Dbg_syms_ar_checking Dbg32_syms_ar_checking 563178525Sjb#define Dbg_syms_ar_entry Dbg32_syms_ar_entry 564178525Sjb#define Dbg_syms_ar_resolve Dbg32_syms_ar_resolve 565178525Sjb#define Dbg_syms_ar_title Dbg32_syms_ar_title 566178525Sjb#define Dbg_syms_created Dbg32_syms_created 567178525Sjb#define Dbg_syms_discarded Dbg32_syms_discarded 568178525Sjb#define Dbg_syms_dlsym Dbg32_syms_dlsym 569178525Sjb#define Dbg_syms_dup_sort_addr Dbg32_syms_dup_sort_addr 570178525Sjb#define Dbg_syms_entered Dbg32_syms_entered 571178525Sjb#define Dbg_syms_entry Dbg32_syms_entry 572178525Sjb#define Dbg_syms_global Dbg32_syms_global 573178525Sjb#define Dbg_syms_ignore Dbg32_syms_ignore 574178525Sjb#define Dbg_syms_ignore_gnuver Dbg32_syms_ignore_gnuver 575178525Sjb#define Dbg_syms_lazy_rescan Dbg32_syms_lazy_rescan 576178525Sjb#define Dbg_syms_lookup Dbg32_syms_lookup 577178525Sjb#define Dbg_syms_lookup_aout Dbg32_syms_lookup_aout 578178525Sjb#define Dbg_syms_new Dbg32_syms_new 579178525Sjb#define Dbg_syms_old Dbg32_syms_old 580178525Sjb#define Dbg_syms_process Dbg32_syms_process 581178525Sjb#define Dbg_syms_reduce Dbg32_syms_reduce 582178525Sjb#define Dbg_syms_reloc Dbg32_syms_reloc 583178525Sjb#define Dbg_syms_resolved Dbg32_syms_resolved 584178525Sjb#define Dbg_syms_resolving Dbg32_syms_resolving 585178525Sjb#define Dbg_syms_sec_entry Dbg32_syms_sec_entry 586178525Sjb#define Dbg_syms_sec_title Dbg32_syms_sec_title 587178525Sjb#define Dbg_syms_spec_title Dbg32_syms_spec_title 588178525Sjb#define Dbg_syms_updated Dbg32_syms_updated 589178525Sjb#define Dbg_syms_up_title Dbg32_syms_up_title 590178525Sjb 591178525Sjb#define Dbg_util_broadcast Dbg32_util_broadcast 592178525Sjb#define Dbg_util_call_array Dbg32_util_call_array 593178525Sjb#define Dbg_util_call_fini Dbg32_util_call_fini 594178525Sjb#define Dbg_util_call_init Dbg32_util_call_init 595178525Sjb#define Dbg_util_call_main Dbg32_util_call_main 596178525Sjb#define Dbg_util_collect Dbg32_util_collect 597178525Sjb#define Dbg_util_dbnotify Dbg32_util_dbnotify 598178525Sjb#define Dbg_util_edge_in Dbg32_util_edge_in 599178525Sjb#define Dbg_util_edge_out Dbg32_util_edge_out 600178525Sjb#define Dbg_util_intoolate Dbg32_util_intoolate 601178525Sjb#define Dbg_util_lcinterface Dbg32_util_lcinterface 602178525Sjb#define Dbg_util_nl Dbg32_util_nl 603178525Sjb#define Dbg_util_no_init Dbg32_util_no_init 604178525Sjb#define Dbg_util_scc_entry Dbg32_util_scc_entry 605178525Sjb#define Dbg_util_scc_title Dbg32_util_scc_title 606178525Sjb#define Dbg_util_str Dbg32_util_str 607178525Sjb#define Dbg_util_wait Dbg32_util_wait 608178525Sjb 609178525Sjb#define Dbg_unused_file Dbg32_unused_file 610178525Sjb#define Dbg_unused_lcinterface Dbg32_unused_lcinterface 611178525Sjb#define Dbg_unused_path Dbg32_unused_path 612178525Sjb#define Dbg_unused_sec Dbg32_unused_sec 613178525Sjb#define Dbg_unused_unref Dbg32_unused_unref 614178525Sjb 615178525Sjb#define Dbg_ver_avail_entry Dbg32_ver_avail_entry 616178525Sjb#define Dbg_ver_avail_title Dbg32_ver_avail_title 617178525Sjb#define Dbg_ver_def_title Dbg32_ver_def_title 618178525Sjb#define Dbg_ver_desc_entry Dbg32_ver_desc_entry 619178525Sjb#define Dbg_ver_need_entry Dbg32_ver_need_entry 620178525Sjb#define Dbg_ver_need_title Dbg32_ver_need_title 621178525Sjb#define Dbg_ver_nointerface Dbg32_ver_nointerface 622178525Sjb#define Dbg_ver_symbol Dbg32_ver_symbol 623178525Sjb 624178525Sjb#endif 625178525Sjb 626178525Sjb/* 627178525Sjb * External Dbg_*() interface routines. 628178525Sjb */ 629178525Sjbextern void Dbg_args_files(Lm_list *, int, char *); 630178525Sjbextern void Dbg_args_flags(Lm_list *, int, int); 631178525Sjbextern void Dbg_audit_ignore(Rt_map *); 632178525Sjbextern void Dbg_audit_interface(Lm_list *, const char *, const char *); 633178525Sjbextern void Dbg_audit_lib(Lm_list *, const char *); 634178525Sjbextern void Dbg_audit_object(Lm_list *, const char *, const char *); 635178525Sjbextern void Dbg_audit_symval(Lm_list *, const char *, const char *, 636178525Sjb const char *, Addr, Addr); 637178525Sjbextern void Dbg_audit_skip(Lm_list *, const char *, const char *); 638178525Sjbextern void Dbg_audit_terminate(Lm_list *, const char *); 639178525Sjbextern void Dbg_audit_version(Lm_list *, const char *, ulong_t); 640178525Sjb 641178525Sjbextern void Dbg_bind_global(Rt_map *, Addr, Off, Xword, Pltbindtype, 642178525Sjb Rt_map *, Addr, Off, const char *, uint_t); 643178525Sjbextern void Dbg_bind_plt_summary(Lm_list *, Half, Word, Word, Word, Word, 644178525Sjb Word, Word); 645178525Sjb#if defined(_ELF64) 646178525Sjbextern void Dbg_bind_pltpad_from(Rt_map *, Addr, const char *); 647178525Sjbextern void Dbg_bind_pltpad_to(Rt_map *, Addr, const char *, const char *); 648178525Sjb#endif 649178525Sjbextern void Dbg_bind_reject(Rt_map *, Rt_map *, const char *, int); 650178525Sjbextern void Dbg_bind_weak(Rt_map *, Addr, Addr, const char *); 651178525Sjb 652178525Sjbextern void Dbg_cap_hw_candidate(Lm_list *, const char *); 653178525Sjbextern void Dbg_cap_hw_filter(Lm_list *, const char *, Rt_map *); 654178525Sjbextern void Dbg_cap_mapfile(Lm_list *, Xword, Xword, Half); 655178525Sjbextern void Dbg_cap_sec_entry(Lm_list *, uint_t, Xword, Xword, Half); 656178525Sjbextern void Dbg_cap_sec_title(Ofl_desc *); 657178525Sjbextern void Dbg_cap_val_hw1(Lm_list *, Xword, Half); 658178525Sjb 659178525Sjbextern const char * 660178525Sjb Dbg_demangle_name(const char *); 661178525Sjb 662178525Sjbextern void Dbg_ent_entry(Lm_list *, Half, Ent_desc *); 663178525Sjbextern void Dbg_ent_print(Lm_list *, Half, List *, Boolean); 664178525Sjb 665178525Sjbextern void Dbg_file_analyze(Rt_map *); 666178525Sjbextern void Dbg_file_aout(Lm_list *, const char *, ulong_t, ulong_t, 667178525Sjb ulong_t, const char *, Aliste); 668178525Sjbextern void Dbg_file_ar(Lm_list *, const char *, int); 669178525Sjbextern void Dbg_file_ar_rescan(Lm_list *); 670178525Sjbextern void Dbg_file_bind_entry(Lm_list *, Bnd_desc *); 671178525Sjbextern void Dbg_file_bindings(Rt_map *, int); 672178525Sjbextern void Dbg_file_cleanup(Lm_list *, const char *, Aliste); 673178525Sjbextern void Dbg_file_cntl(Lm_list *, Aliste, Aliste); 674178525Sjbextern void Dbg_file_config_dis(Lm_list *, const char *, int); 675178525Sjbextern void Dbg_file_config_obj(Lm_list *, const char *, const char *, 676178525Sjb const char *); 677178525Sjbextern void Dbg_file_del_rescan(Lm_list *); 678178525Sjbextern void Dbg_file_delete(Rt_map *); 679178525Sjbextern void Dbg_file_dlclose(Lm_list *, const char *, int); 680178525Sjbextern void Dbg_file_dldump(Rt_map *, const char *, int); 681178525Sjbextern void Dbg_file_dlopen(Rt_map *, const char *, int *, int); 682178525Sjbextern void Dbg_file_elf(Lm_list *, const char *, ulong_t, ulong_t, 683178525Sjb ulong_t, ulong_t, const char *, Aliste); 684178525Sjbextern void Dbg_file_filtee(Lm_list *, const char *, const char *, int); 685178525Sjbextern void Dbg_file_filter(Lm_list *, const char *, const char *, int); 686178525Sjbextern void Dbg_file_fixname(Lm_list *, const char *, const char *); 687178525Sjbextern void Dbg_file_generic(Lm_list *, Ifl_desc *); 688178525Sjbextern void Dbg_file_hdl_action(Grp_hdl *, Rt_map *, int, uint_t); 689178525Sjbextern void Dbg_file_hdl_collect(Grp_hdl *, const char *); 690178525Sjbextern void Dbg_file_hdl_title(int); 691178525Sjbextern void Dbg_file_lazyload(Rt_map *, const char *, const char *); 692178525Sjbextern void Dbg_file_ldso(Rt_map *, char **, auxv_t *, const char *, 693178525Sjb Aliste); 694178525Sjbextern void Dbg_file_mode_promote(Rt_map *, int); 695178525Sjbextern void Dbg_file_modified(Lm_list *, const char *, const char *, 696178525Sjb const char *, int, int, Elf *, Elf *); 697178525Sjbextern void Dbg_file_needed(Rt_map *, const char *); 698178525Sjbextern void Dbg_file_output(Ofl_desc *); 699178525Sjbextern void Dbg_file_preload(Lm_list *, const char *); 700178525Sjbextern void Dbg_file_prot(Rt_map *, int); 701178525Sjbextern void Dbg_file_rejected(Lm_list *, Rej_desc *, Half mach); 702178525Sjbextern void Dbg_file_reuse(Lm_list *, const char *, const char *); 703178525Sjbextern void Dbg_file_skip(Lm_list *, const char *, const char *); 704178525Sjb 705178525Sjbextern void Dbg_got_display(Ofl_desc *, Off, int, Word, size_t); 706178525Sjb 707178525Sjbextern void Dbg_libs_audit(Lm_list *, const char *, const char *); 708178525Sjbextern void Dbg_libs_find(Lm_list *, const char *); 709178525Sjbextern void Dbg_libs_found(Lm_list *, const char *, int); 710178525Sjbextern void Dbg_libs_ignore(Lm_list *, const char *); 711178525Sjbextern void Dbg_libs_init(Lm_list *, List *, List *); 712178525Sjbextern void Dbg_libs_l(Lm_list *, const char *, const char *); 713178525Sjbextern void Dbg_libs_path(Lm_list *, const char *, uint_t, const char *); 714178525Sjbextern void Dbg_libs_req(Lm_list *, const char *, const char *, 715178525Sjb const char *); 716178525Sjbextern void Dbg_libs_update(Lm_list *, List *, List *); 717178525Sjbextern void Dbg_libs_yp(Lm_list *, const char *); 718178525Sjbextern void Dbg_libs_ylu(Lm_list *, const char *, const char *, int); 719178525Sjb 720178525Sjbextern void Dbg_map_dash(Lm_list *, const char *, Sdf_desc *); 721178525Sjbextern void Dbg_map_ent(Lm_list *, Boolean, Ent_desc *, Ofl_desc *); 722178525Sjbextern void Dbg_map_parse(Lm_list *, const char *); 723178525Sjbextern void Dbg_map_pipe(Lm_list *, Sg_desc *, const char *, const Word); 724178525Sjbextern void Dbg_map_seg(Ofl_desc *, int, Sg_desc *); 725178525Sjbextern void Dbg_map_set_atsign(Boolean); 726178525Sjbextern void Dbg_map_set_equal(Boolean); 727178525Sjbextern void Dbg_map_size_new(Lm_list *, const char *); 728178525Sjbextern void Dbg_map_size_old(Ofl_desc *, Sym_desc *); 729178525Sjbextern void Dbg_map_sort_fini(Lm_list *, Sg_desc *); 730178525Sjbextern void Dbg_map_sort_orig(Lm_list *, Sg_desc *); 731178525Sjbextern void Dbg_map_symbol(Ofl_desc *, Sym_desc *); 732178525Sjbextern void Dbg_map_version(Lm_list *, const char *, const char *, int); 733178525Sjb 734178525Sjbextern void Dbg_move_adjexpandreloc(Lm_list *, Xword, const char *); 735178525Sjbextern void Dbg_move_adjmovereloc(Lm_list *, Xword, Xword, const char *); 736178525Sjbextern void Dbg_move_data(Rt_map *); 737178525Sjbextern void Dbg_move_entry1(Lm_list *, int, Move *, Sym_desc *); 738178525Sjbextern void Dbg_move_entry2(Lm_list *, Move *, Word, const char *); 739178525Sjbextern void Dbg_move_expand(Lm_list *, Move *, Addr); 740178525Sjbextern void Dbg_move_input(Lm_list *, const char *); 741178525Sjbextern void Dbg_move_outmove(Lm_list *, const char *); 742178525Sjbextern void Dbg_move_outsctadj(Lm_list *, Sym_desc *); 743178525Sjbextern void Dbg_move_parexpn(Lm_list *, const char *, const char *); 744178525Sjb 745178525Sjbextern void Dbg_reloc_apply_reg(Lm_list *, int, Half, Xword, Xword); 746178525Sjbextern void Dbg_reloc_apply_val(Lm_list *, int, Xword, Xword); 747178525Sjbextern void Dbg_reloc_ars_entry(Lm_list *, int, Word, Half, Rel_desc *); 748178525Sjbextern void Dbg_reloc_copy(Rt_map *, Rt_map *, const char *, int); 749178525Sjbextern void Dbg_reloc_discard(Lm_list *, Half, Rel_desc *); 750178525Sjbextern void Dbg_reloc_doact(Lm_list *, int, Half, Word, Word, Xword, Xword, 751178525Sjb const char *, Os_desc *); 752178525Sjbextern void Dbg_reloc_doact_title(Lm_list *); 753178525Sjbextern void Dbg_reloc_dooutrel(Lm_list *, Word); 754178525Sjbextern void Dbg_reloc_entry(Lm_list *, const char *, Half, Word, void *, 755178525Sjb const char *, const char *, const char *); 756178525Sjbextern void Dbg_reloc_error(Lm_list *, int, Half, Word, void *, 757178525Sjb const char *); 758178525Sjbextern void Dbg_reloc_generate(Lm_list *, Os_desc *, Word); 759178525Sjbextern void Dbg_reloc_in(Lm_list *, int, Half, Word, void *, const char *, 760178525Sjb const char *); 761178525Sjbextern void Dbg_reloc_ors_entry(Lm_list *, int, Word, Half, Rel_desc *); 762178525Sjbextern void Dbg_reloc_out(Ofl_desc *, int, Word, void *, const char *, 763178525Sjb const char *); 764178525Sjbextern void Dbg_reloc_proc(Lm_list *, Os_desc *, Is_desc *, Is_desc *); 765178525Sjbextern void Dbg_reloc_run(Rt_map *, uint_t, int, int); 766178525Sjbextern void Dbg_reloc_transition(Lm_list *, Half, Word, Rel_desc *); 767178525Sjbextern void Dbg_reloc_sloppycomdat(Lm_list *, const char *, Sym_desc *); 768178525Sjb 769178525Sjbextern void Dbg_sec_added(Lm_list *, Os_desc *, Sg_desc *); 770178525Sjbextern void Dbg_sec_created(Lm_list *, Os_desc *, Sg_desc *); 771178525Sjbextern void Dbg_sec_discarded(Lm_list *, Is_desc *, Is_desc *); 772178525Sjbextern void Dbg_sec_genstr_compress(Lm_list *, const char *, 773178525Sjb Xword, Xword); 774178525Sjbextern void Dbg_sec_group(Lm_list *, Is_desc *, Group_desc *); 775178525Sjbextern void Dbg_sec_in(Lm_list *, Is_desc *); 776178525Sjbextern void Dbg_sec_order_error(Lm_list *, Ifl_desc *, Word, int); 777178525Sjbextern void Dbg_sec_order_list(Ofl_desc *, int); 778178525Sjbextern void Dbg_sec_strtab(Lm_list *, Os_desc *, Str_tbl *); 779178525Sjbextern void Dbg_sec_unsup_strmerge(Lm_list *, Is_desc *); 780178525Sjb 781178525Sjbextern void Dbg_seg_desc_entry(Lm_list *, Half, int, Sg_desc *); 782178525Sjbextern void Dbg_seg_entry(Ofl_desc *, int, Sg_desc *); 783178525Sjbextern void Dbg_seg_list(Lm_list *, Half, List *); 784178525Sjbextern void Dbg_seg_os(Ofl_desc *, Os_desc *, int); 785178525Sjbextern void Dbg_seg_title(Lm_list *); 786178525Sjb 787178525Sjbextern void Dbg_shdr_modified(Lm_list *, const char *, Half, Shdr *, Shdr *, 788178525Sjb const char *); 789178525Sjb 790178525Sjbextern void Dbg_statistics_ar(Ofl_desc *); 791178525Sjbextern void Dbg_statistics_ld(Ofl_desc *); 792178525Sjb 793178525Sjbextern void Dbg_support_action(Lm_list *, const char *, const char *, 794178525Sjb Support_ndx, const char *); 795178525Sjbextern void Dbg_support_load(Lm_list *, const char *, const char *); 796178525Sjbextern void Dbg_support_req(Lm_list *, const char *, int); 797178525Sjb 798178525Sjbextern void Dbg_syminfo_entry(Lm_list *, Word, Syminfo *, Sym *, 799178525Sjb const char *, Dyn *); 800178525Sjbextern void Dbg_syminfo_title(Lm_list *); 801178525Sjb 802178525Sjbextern void Dbg_syms_ar_checking(Lm_list *, Xword, Elf_Arsym *, 803178525Sjb const char *); 804178525Sjbextern void Dbg_syms_ar_entry(Lm_list *, Xword, Elf_Arsym *); 805178525Sjbextern void Dbg_syms_ar_resolve(Lm_list *, Xword, Elf_Arsym *, 806178525Sjb const char *, int); 807178525Sjbextern void Dbg_syms_ar_title(Lm_list *, const char *, int); 808178525Sjbextern void Dbg_syms_created(Lm_list *, const char *); 809178525Sjbextern void Dbg_syms_discarded(Lm_list *, Sym_desc *); 810178525Sjbextern void Dbg_syms_dlsym(Rt_map *, const char *, int *, const char *, 811178525Sjb int); 812178525Sjbextern void Dbg_syms_dup_sort_addr(Lm_list *, const char *, const char *, 813178525Sjb const char *, Addr); 814178525Sjbextern void Dbg_syms_entered(Ofl_desc *, Sym *, Sym_desc *); 815178525Sjbextern void Dbg_syms_entry(Lm_list *, Word, Sym_desc *); 816178525Sjbextern void Dbg_syms_global(Lm_list *, Word, const char *); 817178525Sjbextern void Dbg_syms_ignore(Ofl_desc *, Sym_desc *); 818178525Sjbextern void Dbg_syms_ignore_gnuver(Rt_map *, const char *, Word, Versym); 819178525Sjbextern void Dbg_syms_lazy_rescan(Lm_list *, const char *); 820178525Sjbextern void Dbg_syms_lookup(Rt_map *, const char *, const char *); 821178525Sjb#if !(defined(_ELF64)) 822178525Sjbextern void Dbg_syms_lookup_aout(Lm_list *, const char *); 823178525Sjb#endif 824178525Sjbextern void Dbg_syms_new(Ofl_desc *, Sym *, Sym_desc *); 825178525Sjbextern void Dbg_syms_old(Ofl_desc *, Sym_desc *); 826178525Sjbextern void Dbg_syms_process(Lm_list *, Ifl_desc *); 827178525Sjbextern void Dbg_syms_reduce(Ofl_desc *, int, Sym_desc *, int, 828178525Sjb const char *); 829178525Sjbextern void Dbg_syms_reloc(Ofl_desc *, Sym_desc *); 830178525Sjbextern void Dbg_syms_resolved(Ofl_desc *, Sym_desc *); 831178525Sjbextern void Dbg_syms_resolving(Ofl_desc *, Word, const char *, int, int, 832178525Sjb Sym *, Sym *, Sym_desc *, Ifl_desc *); 833178525Sjbextern void Dbg_syms_sec_entry(Lm_list *, Word, Sg_desc *, Os_desc *); 834178525Sjbextern void Dbg_syms_sec_title(Lm_list *); 835178525Sjbextern void Dbg_syms_spec_title(Lm_list *); 836178525Sjbextern void Dbg_syms_updated(Ofl_desc *, Sym_desc *, const char *); 837178525Sjbextern void Dbg_syms_up_title(Lm_list *); 838178525Sjb 839178525Sjbextern void Dbg_tls_modactivity(Lm_list *, void *, uint_t); 840178525Sjbextern void Dbg_tls_static_block(Lm_list *, void *, ulong_t, ulong_t); 841178525Sjbextern void Dbg_tls_static_resv(Rt_map *, ulong_t, ulong_t); 842178525Sjb 843178525Sjbextern void Dbg_util_broadcast(Rt_map *); 844178525Sjbextern void Dbg_util_call_array(Rt_map *, void *, int, Word); 845178525Sjbextern void Dbg_util_call_fini(Rt_map *); 846178525Sjbextern void Dbg_util_call_init(Rt_map *, int); 847178525Sjbextern void Dbg_util_call_main(Rt_map *); 848178525Sjbextern void Dbg_util_collect(Rt_map *, int, int); 849178525Sjbextern void Dbg_util_dbnotify(Lm_list *, rd_event_e, r_state_e); 850178525Sjbextern void Dbg_util_edge_in(Lm_list *, Rt_map *, uint_t, Rt_map *, 851178525Sjb int, int); 852178525Sjbextern void Dbg_util_edge_out(Rt_map *, Rt_map *); 853178525Sjbextern void Dbg_util_intoolate(Rt_map *); 854178525Sjbextern void Dbg_util_lcinterface(Rt_map *, int, char *); 855178525Sjbextern void Dbg_util_nl(Lm_list *, int); 856178525Sjbextern void Dbg_util_no_init(Rt_map *); 857178525Sjbextern void Dbg_util_str(Lm_list *, const char *); 858178525Sjbextern void Dbg_util_scc_entry(Rt_map *, uint_t); 859178525Sjbextern void Dbg_util_scc_title(Lm_list *, int); 860178525Sjbextern void Dbg_util_wait(Rt_map *, Rt_map *, int); 861178525Sjb 862178525Sjbextern void Dbg_unused_file(Lm_list *, const char *, int, uint_t); 863178525Sjbextern void Dbg_unused_lcinterface(Rt_map *, Rt_map *, int); 864178525Sjbextern void Dbg_unused_path(Lm_list *, const char *, uint_t, uint_t, 865178525Sjb const char *); 866178525Sjbextern void Dbg_unused_sec(Lm_list *, Is_desc *); 867178525Sjbextern void Dbg_unused_unref(Rt_map *, const char *); 868178525Sjb 869178525Sjbextern void Dbg_ver_avail_entry(Lm_list *, Ver_index *, const char *); 870178525Sjbextern void Dbg_ver_avail_title(Lm_list *, const char *); 871178525Sjbextern void Dbg_ver_def_title(Lm_list *, const char *); 872178525Sjbextern void Dbg_ver_desc_entry(Lm_list *, Ver_desc *); 873178525Sjbextern void Dbg_ver_need_entry(Lm_list *, Half, const char *, 874178525Sjb const char *); 875178525Sjbextern void Dbg_ver_need_title(Lm_list *, const char *); 876178525Sjbextern void Dbg_ver_nointerface(Lm_list *, const char *); 877178525Sjbextern void Dbg_ver_symbol(Lm_list *, const char *); 878178525Sjb 879178525Sjb/* 880178525Sjb * Define Elf_*() interface flags. 881178525Sjb */ 882178525Sjb#define ELF_DBG_ELFDUMP 1 883178525Sjb#define ELF_DBG_RTLD 2 884178525Sjb#define ELF_DBG_LD 3 885178525Sjb 886178525Sjb/* 887178525Sjb * Define generic Elf_*() interfaces. 888178525Sjb */ 889178525Sjbextern void Elf_syminfo_entry(Lm_list *, Word, Syminfo *, const char *, 890178525Sjb const char *); 891178525Sjbextern void Elf_syminfo_title(Lm_list *); 892178525Sjb 893178525Sjb/* 894178525Sjb * Establish ELF32 and ELF64 class Elf_*() interfaces. 895178525Sjb */ 896178525Sjb#if defined(_ELF64) 897178525Sjb 898178525Sjb#define Elf_cap_entry Elf64_cap_entry 899178525Sjb#define Elf_cap_title Elf64_cap_title 900178525Sjb 901178525Sjb#define Elf_demangle_name Elf64_demangle_name 902178525Sjb#define Elf_dyn_entry Elf64_dyn_entry 903178525Sjb#define Elf_dyn_null_entry Elf64_dyn_null_entry 904178525Sjb#define Elf_dyn_title Elf64_dyn_title 905178525Sjb 906178525Sjb#define Elf_ehdr Elf64_ehdr 907178525Sjb 908178525Sjb#define Elf_got_entry Elf64_got_entry 909178525Sjb#define Elf_got_title Elf64_got_title 910178525Sjb 911178525Sjb#define Elf_reloc_apply_reg Elf64_reloc_apply_reg 912178525Sjb#define Elf_reloc_apply_val Elf64_reloc_apply_val 913178525Sjb#define Elf_reloc_entry_1 Elf64_reloc_entry_1 914178525Sjb#define Elf_reloc_entry_2 Elf64_reloc_entry_2 915178525Sjb#define Elf_reloc_title Elf64_reloc_title 916178525Sjb 917178525Sjb#define Elf_phdr Elf64_phdr 918178525Sjb 919178525Sjb#define Elf_shdr Elf64_shdr 920178525Sjb 921178525Sjb#define Elf_syms_table_entry Elf64_syms_table_entry 922178525Sjb#define Elf_syms_table_title Elf64_syms_table_title 923178525Sjb 924178525Sjb#define Elf_ver_def_title Elf64_ver_def_title 925178525Sjb#define Elf_ver_line_1 Elf64_ver_line_1 926178525Sjb#define Elf_ver_line_2 Elf64_ver_line_2 927178525Sjb#define Elf_ver_line_3 Elf64_ver_line_3 928178525Sjb#define Elf_ver_line_4 Elf64_ver_line_4 929178525Sjb#define Elf_ver_line_5 Elf64_ver_line_5 930178525Sjb#define Elf_ver_need_title Elf64_ver_need_title 931178525Sjb 932178525Sjb#else 933178525Sjb 934178525Sjb#define Elf_cap_entry Elf32_cap_entry 935178525Sjb#define Elf_cap_title Elf32_cap_title 936178525Sjb 937178525Sjb#define Elf_demangle_name Elf32_demangle_name 938178525Sjb#define Elf_dyn_entry Elf32_dyn_entry 939178525Sjb#define Elf_dyn_null_entry Elf32_dyn_null_entry 940178525Sjb#define Elf_dyn_title Elf32_dyn_title 941178525Sjb 942178525Sjb#define Elf_ehdr Elf32_ehdr 943178525Sjb 944178525Sjb#define Elf_got_entry Elf32_got_entry 945178525Sjb#define Elf_got_title Elf32_got_title 946178525Sjb 947178525Sjb#define Elf_reloc_apply_reg Elf32_reloc_apply_reg 948178525Sjb#define Elf_reloc_apply_val Elf32_reloc_apply_val 949178525Sjb#define Elf_reloc_entry_1 Elf32_reloc_entry_1 950178525Sjb#define Elf_reloc_entry_2 Elf32_reloc_entry_2 951178525Sjb#define Elf_reloc_title Elf32_reloc_title 952178525Sjb 953178525Sjb#define Elf_phdr Elf32_phdr 954178525Sjb 955178525Sjb#define Elf_shdr Elf32_shdr 956178525Sjb 957178525Sjb#define Elf_syms_table_entry Elf32_syms_table_entry 958178525Sjb#define Elf_syms_table_title Elf32_syms_table_title 959178525Sjb 960178525Sjb#define Elf_ver_def_title Elf32_ver_def_title 961178525Sjb#define Elf_ver_line_1 Elf32_ver_line_1 962178525Sjb#define Elf_ver_line_2 Elf32_ver_line_2 963178525Sjb#define Elf_ver_line_3 Elf32_ver_line_3 964178525Sjb#define Elf_ver_line_4 Elf32_ver_line_4 965178525Sjb#define Elf_ver_line_5 Elf32_ver_line_5 966178525Sjb#define Elf_ver_need_title Elf32_ver_need_title 967178525Sjb 968178525Sjb#endif 969178525Sjb 970178525Sjbextern void Elf_cap_entry(Lm_list *, Cap *, int, Half); 971178525Sjbextern void Elf_cap_title(Lm_list *); 972178525Sjb 973178525Sjbextern const char \ 974178525Sjb *Elf_demangle_name(const char *); 975178525Sjbextern void Elf_dyn_entry(Lm_list *, Dyn *, int, const char *, Half); 976178525Sjbextern void Elf_dyn_null_entry(Lm_list *, Dyn *, int, int); 977178525Sjbextern void Elf_dyn_title(Lm_list *); 978178525Sjb 979178525Sjbextern void Elf_ehdr(Lm_list *, Ehdr *, Shdr *); 980178525Sjb 981178525Sjbextern void Elf_got_entry(Lm_list *, Sword, Addr, Xword, Half, 982178525Sjb uchar_t, uchar_t, Word, void *, const char *); 983178525Sjbextern void Elf_got_title(Lm_list *); 984178525Sjb 985178525Sjbextern void Elf_phdr(Lm_list *, Half, Phdr *); 986178525Sjb 987178525Sjbextern void Elf_reloc_apply_val(Lm_list *, int, Xword, Xword); 988178525Sjbextern void Elf_reloc_apply_reg(Lm_list *, int, Half, Xword, Xword); 989178525Sjbextern void Elf_reloc_entry_1(Lm_list *, int, const char *, Half, Word, 990178525Sjb void *, const char *, const char *, const char *); 991178525Sjbextern void Elf_reloc_entry_2(Lm_list *, int, const char *, Word, 992178525Sjb const char *, Off, Sxword, const char *, const char *, 993178525Sjb const char *); 994178525Sjbextern void Elf_reloc_title(Lm_list *, int, Word); 995178525Sjb 996178525Sjbextern void Elf_shdr(Lm_list *, Half, Shdr *); 997178525Sjb 998178525Sjbextern void Elf_syms_table_entry(Lm_list *, int, const char *, Half, Sym *, 999178525Sjb Versym, int, const char *, const char *); 1000178525Sjbextern void Elf_syms_table_title(Lm_list *, int); 1001178525Sjb 1002178525Sjbextern void Elf_ver_def_title(Lm_list *); 1003178525Sjbextern void Elf_ver_line_1(Lm_list *, const char *, const char *, 1004178525Sjb const char *, const char *); 1005178525Sjbextern void Elf_ver_line_2(Lm_list *, const char *, const char *); 1006178525Sjbextern void Elf_ver_line_3(Lm_list *, const char *, const char *, 1007178525Sjb const char *); 1008178525Sjbextern void Elf_ver_line_4(Lm_list *, const char *); 1009178525Sjbextern void Elf_ver_line_5(Lm_list *, const char *, const char *); 1010178525Sjbextern void Elf_ver_need_title(Lm_list *, int); 1011178525Sjb 1012178525Sjb 1013178525Sjb#ifdef __cplusplus 1014178525Sjb} 1015178525Sjb#endif 1016178525Sjb 1017178525Sjb#endif /* _DEBUG_H */ 1018