xref: /titanic_41/usr/src/cmd/sgs/liblddbg/common/llib-llddbg (revision c9a6ea2e938727c95af7108c5e00eee4c890c7ae)
1/*
2 * CDDL HEADER START
3 *
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21/* LINTLIBRARY */
22/* PROTOLIB1 */
23
24/*
25 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
26 */
27
28#include <sys/types.h>
29#include <sys/auxv.h>
30#include <debug.h>
31
32int	Dbg_setup(dbg_setup_caller_t, const char *, Dbg_desc *, const char **);
33void	Dbg_help(void);
34void	Dbg_version(void);
35const char *
36	Dbg_demangle_name(const char *);
37
38void	Dbg_args_file(Lm_list *, int, char *);
39void	Dbg_args_option(Lm_list *, int, int, char *);
40void	Dbg_args_str2chr(Lm_list *, int, const char *, int);
41void	Dbg_args_Wldel(Lm_list *, int, const char *);
42void	Dbg_audit_activity(Lm_list *, const char *, const char *, uint_t);
43void	Dbg_audit_ignore(Rt_map *);
44void	Dbg_audit_interface(Lm_list *, const char *, const char *);
45void	Dbg_audit_lib(Rt_map *, const char *, int);
46void	Dbg_audit_objclose(Lm_list *, const char *, const char *);
47void	Dbg_audit_objfilter(Lm_list *, int, const char *, const char *,
48	    const char *, const char *);
49void	Dbg_audit_objopen(Lm_list *, int, const char *, const char *, uint_t,
50	    Boolean);
51void	Dbg_audit_objsearch(Lm_list *, int, const char *, const char *, uint_t,
52	    const char *);
53void	Dbg_audit_pltenter(Lm_list *, int, const char *, const char *, Addr);
54void	Dbg_audit_pltexit(Lm_list *, const char *, const char *);
55void	Dbg_audit_preinit(Lm_list *, const char *, const char *);
56void	Dbg_audit_symbind(Lm_list *, int, const char *, const char *,
57	    Addr, uint_t);
58void	Dbg_audit_skip(Lm_list *, const char *, const char *);
59void	Dbg_audit_terminate(Lm_list *, const char *);
60void	Dbg_audit_version(Lm_list *, const char *, uint_t, uint_t);
61
62void	Dbg_basic_collect(Lm_list *);
63void	Dbg_basic_create(Lm_list *);
64void	Dbg_basic_files(Lm_list *);
65void	Dbg_basic_finish(Lm_list *);
66void	Dbg_basic_options(Lm_list *);
67void	Dbg_basic_relocate(Lm_list *);
68void	Dbg_basic_validate(Lm_list *);
69
70void	Dbg_tls_modactivity(Lm_list *, void *, uint_t);
71void	Dbg_tls_static_block(Lm_list *, void *, ulong_t, ulong_t);
72void	Dbg_tls_static_resv(Rt_map *, ulong_t, ulong_t);
73
74void	Dbg32_bind_global(Rt_map *, Elf32_Addr, Elf32_Off, Elf32_Word,
75	    Pltbindtype, Rt_map *, Elf32_Addr, Elf32_Off, const char *, uint_t);
76void	Dbg64_bind_global(Rt_map *, Elf64_Addr, Elf64_Off, Elf64_Xword,
77	    Pltbindtype, Rt_map *, Elf64_Addr, Elf64_Off, const char *, uint_t);
78void	Dbg64_bind_pltpad_to(Rt_map *, Addr, const char *, const char *);
79void	Dbg64_bind_pltpad_from(Rt_map *, Addr, const char *);
80void	Dbg32_bind_reject(Rt_map *, Rt_map *, const char *, int);
81void	Dbg64_bind_reject(Rt_map *, Rt_map *, const char *, int);
82void	Dbg32_bind_weak(Rt_map *, Elf32_Addr, Elf32_Addr, const char *);
83void	Dbg64_bind_weak(Rt_map *, Elf64_Addr, Elf64_Addr, const char *);
84
85void	Dbg32_cap_candidate(Lm_list *, const char *);
86void	Dbg64_cap_candidate(Lm_list *, const char *);
87void	Dbg32_cap_filter(Lm_list *, const char *, Rt_map *);
88void	Dbg64_cap_filter(Lm_list *, const char *, Rt_map *);
89void	Dbg32_cap_id(Lm_list *, Lineno, const char *, const char *);
90void	Dbg64_cap_id(Lm_list *, Lineno, const char *, const char *);
91void	Dbg32_cap_identical(Lm_list *, const char *, const char *);
92void	Dbg64_cap_identical(Lm_list *, const char *, const char *);
93void	Dbg32_cap_mapfile_title(Lm_list *, Lineno);
94void	Dbg64_cap_mapfile_title(Lm_list *, Lineno);
95void	Dbg32_cap_post_title(Lm_list *, int *);
96void	Dbg64_cap_post_title(Lm_list *, int *);
97void	Dbg32_cap_out_title(Lm_list *);
98void	Dbg64_cap_out_title(Lm_list *);
99void	Dbg32_cap_sec_title(Lm_list *, const char *);
100void	Dbg64_cap_sec_title(Lm_list *, const char *);
101void	Dbg32_cap_val(Lm_list *, Syscapset *, Syscapset *, Elf32_Half);
102void	Dbg64_cap_val(Lm_list *, Syscapset *, Syscapset *, Elf64_Half);
103
104void	Dbg32_dl_dladdr(Rt_map *, void *);
105void	Dbg64_dl_dladdr(Rt_map *, void *);
106void	Dbg32_dl_dlclose(Rt_map *, const char *, int);
107void	Dbg64_dl_dlclose(Rt_map *, const char *, int);
108void	Dbg32_dl_dldump(Rt_map *, const char *, const char *, int);
109void	Dbg64_dl_dldump(Rt_map *, const char *, const char *, int);
110void	Dbg32_dl_dlerror(Rt_map *, const char *);
111void	Dbg64_dl_dlerror(Rt_map *, const char *);
112void	Dbg32_dl_dlinfo(Rt_map *, const char *, int, void *);
113void	Dbg64_dl_dlinfo(Rt_map *, const char *, int, void *);
114void	Dbg32_dl_dlopen(Rt_map *, const char *, int *, int);
115void	Dbg64_dl_dlopen(Rt_map *, const char *, int *, int);
116void	Dbg32_dl_dlsym(Rt_map *, const char *, int *, const char *, int);
117void	Dbg64_dl_dlsym(Rt_map *, const char *, int *, const char *, int);
118void	Dbg32_dl_iphdr_callback(Lm_list *, struct dl_phdr_info *);
119void	Dbg64_dl_iphdr_callback(Lm_list *, struct dl_phdr_info *);
120void	Dbg32_dl_iphdr_enter(Rt_map *, u_longlong_t, u_longlong_t);
121void	Dbg64_dl_iphdr_enter(Rt_map *, u_longlong_t, u_longlong_t);
122void	Dbg32_dl_iphdr_mapchange(Lm_list *, u_longlong_t, u_longlong_t);
123void	Dbg64_dl_iphdr_mapchange(Lm_list *, u_longlong_t, u_longlong_t);
124void	Dbg32_dl_iphdr_unmap_ret(Lm_list *);
125void	Dbg64_dl_iphdr_unmap_ret(Lm_list *);
126
127void	Dbg32_ent_print(Lm_list *, uchar_t, Elf32_Half, APlist *);
128void	Dbg64_ent_print(Lm_list *, uchar_t, Elf64_Half, APlist *);
129
130void	Dbg32_file_analyze(Rt_map *);
131void	Dbg64_file_analyze64(Rt_map *);
132void	Dbg32_file_aout(Lm_list *, const char *, Addr, size_t, const char *,
133	    Aliste);
134void	Dbg64_file_aout(Lm_list *, const char *, Addr, size_t, const char *,
135	    Aliste);
136void	Dbg32_file_ar(Lm_list *, const char *, Boolean);
137void	Dbg64_file_ar(Lm_list *, const char *, Boolean);
138void	Dbg32_file_archive(Lm_list *, const char *, int);
139void	Dbg64_file_archive(Lm_list *, const char *, int);
140void	Dbg32_file_bind_entry(Lm_list *, Bnd_desc *);
141void	Dbg64_file_bind_entry(Lm_list *, Bnd_desc *);
142void	Dbg32_file_bindings(Rt_map *, int);
143void	Dbg64_file_bindings(Rt_map *, int);
144void	Dbg32_file_bindings_done(Lm_list *);
145void	Dbg64_file_bindings_done(Lm_list *);
146void	Dbg32_file_config_dis(Lm_list *, const char *, int);
147void	Dbg64_file_config_dis(Lm_list *, const char *, int);
148void	Dbg32_file_config_obj(Lm_list *, const char *, const char *,
149	    const char *);
150void	Dbg64_file_config_obj(Lm_list *, const char *, const char *,
151	    const char *);
152void	Dbg32_file_cntl(Lm_list *, Aliste, Aliste);
153void	Dbg64_file_cntl(Lm_list *, Aliste, Aliste);
154void	Dbg32_file_cleanup(Lm_list *, const char *, Aliste);
155void	Dbg64_file_cleanup(Lm_list *, const char *, Aliste);
156void	Dbg32_file_deferred(Lm_list *, const char *, const char *);
157void	Dbg64_file_deferred(Lm_list *, const char *, const char *);
158void	Dbg32_file_del_rescan(Lm_list *);
159void	Dbg64_file_del_rescan(Lm_list *);
160void	Dbg32_file_delete(Rt_map *);
161void	Dbg64_file_delete(Rt_map *);
162void	Dbg32_file_elf(Lm_list *, const char *, Addr, size_t, const char *,
163	    Aliste);
164void	Dbg64_file_elf(Lm_list *, const char *, Addr, size_t, const char *,
165	    Aliste);
166void	Dbg32_file_filtee(Lm_list *, const char *, const char *, int);
167void	Dbg64_file_filtee(Lm_list *, const char *, const char *, int);
168void	Dbg32_file_filter(Lm_list *, const char *, const char *, int);
169void	Dbg64_file_filter(Lm_list *, const char *, const char *, int);
170void	Dbg64_file_fixname(Lm_list *, const char *, const char *);
171void	Dbg32_file_fixname(Lm_list *, const char *, const char *);
172void	Dbg32_file_hdl_action(Grp_hdl *, Rt_map *, int, uint_t);
173void	Dbg64_file_hdl_action(Grp_hdl *, Rt_map *, int, uint_t);
174void	Dbg32_file_hdl_collect(Grp_hdl *, const char *);
175void	Dbg64_file_hdl_collect(Grp_hdl *, const char *);
176void	Dbg32_file_hdl_title(int);
177void	Dbg64_file_hdl_title(int);
178void	Dbg64_file_lazyload(Rt_map *, const char *, const char *);
179void	Dbg32_file_lazyload(Rt_map *, const char *, const char *);
180void	Dbg32_file_ldso(Rt_map *, char **, auxv_t *, const char *, Aliste);
181void	Dbg64_file_ldso(Rt_map *, char **, auxv_t *, const char *, Aliste);
182void	Dbg32_file_mmapobj(Lm_list *, const char *, mmapobj_result_t *, uint_t);
183void	Dbg64_file_mmapobj(Lm_list *, const char *, mmapobj_result_t *, uint_t);
184void	Dbg32_file_mode_promote(Rt_map *, int);
185void	Dbg64_file_mode_promote(Rt_map *, int);
186void	Dbg32_file_modified(Lm_list *, const char *, const char *, const char *,
187	    int, int, Elf *, Elf *);
188void	Dbg64_file_modified(Lm_list *, const char *, const char *, const char *,
189	    int, int, Elf *, Elf *);
190void	Dbg32_file_needed(Rt_map *, const char *);
191void	Dbg64_file_needed(Rt_map *, const char *);
192void	Dbg32_file_output(Ofl_desc *);
193void	Dbg64_file_output64(Ofl_desc *);
194void	Dbg32_file_preload(Lm_list *, const char *);
195void	Dbg64_file_preload(Lm_list *, const char *);
196void	Dbg32_file_prot(Rt_map *, int);
197void	Dbg64_file_prot(Rt_map *, int);
198void	Dbg32_file_rejected(Lm_list *, Rej_desc *, Elf32_Half);
199void	Dbg64_file_rejected(Lm_list *, Rej_desc *, Elf32_Half);
200void	Dbg32_file_reuse(Lm_list *, const char *, const char *);
201void	Dbg64_file_reuse(Lm_list *, const char *, const char *);
202void	Dbg32_file_skip(Lm_list *, const char *, const char *);
203void	Dbg64_file_skip(Lm_list *, const char *, const char *);
204
205void	Dbg32_got_display(Ofl_desc *, Elf32_Off, int,
206	    Elf32_Word, size_t m_got_entsize);
207void	Dbg64_got_display(Ofl_desc *, Elf64_Off, int,
208	    Elf64_Word, size_t m_got_entsize);
209
210void	Dbg32_libs_audit(Lm_list *, const char *, const char *);
211void	Dbg64_libs_audit(Lm_list *, const char *, const char *);
212void	Dbg32_libs_find(Lm_list *, const char *);
213void	Dbg64_libs_find(Lm_list *, const char *);
214void	Dbg32_libs_found(Lm_list *, const char *, int);
215void	Dbg64_libs_found(Lm_list *, const char *, int);
216void	Dbg32_libs_insecure(Lm_list *, const char *, int);
217void	Dbg64_libs_insecure(Lm_list *, const char *, int);
218void	Dbg32_libs_init(Lm_list *, APlist *, APlist *);
219void	Dbg64_libs_init(Lm_list *, APlist *, APlist *);
220void	Dbg32_libs_l(Lm_list *, const char *, const char *);
221void	Dbg64_libs_l(Lm_list *, const char *, const char *);
222void	Dbg32_libs_path(Lm_list *, const char *, uint_t, const char *);
223void	Dbg64_libs_path(Lm_list *, const char *, uint_t, const char *);
224void	Dbg32_libs_req(Lm_list *, const char *, const char *, const char *);
225void	Dbg64_libs_req(Lm_list *, const char *, const char *, const char *);
226void	Dbg32_libs_update(Lm_list *, APlist *, APlist *);
227void	Dbg64_libs_update(Lm_list *, APlist *, APlist *);
228void	Dbg32_libs_yp(Lm_list *, const char *);
229void	Dbg64_libs_yp(Lm_list *, const char *);
230void	Dbg32_libs_ylu(Lm_list *, const char *, const char *, int);
231void	Dbg64_libs_ylu(Lm_list *, const char *, const char *, int);
232
233void	Dbg32_map_cexp_id(Lm_list *, Boolean, const char *, ulong_t,
234	    const char *);
235void	Dbg64_map_cexp_id(Lm_list *, Boolean, const char *, ulong_t,
236	    const char *);
237void	Dbg32_map_dv(Lm_list *, const char *, Lineno);
238void	Dbg64_map_dv(Lm_list *, const char *, Lineno);
239void	Dbg32_map_dv_entry(Lm_list *, Lineno, int, const char *);
240void	Dbg64_map_dv_entry(Lm_list *, Lineno, int, const char *);
241void	Dbg32_map_ent(Lm_list *, Ent_desc *, Ofl_desc *, Lineno);
242void	Dbg64_map_ent(Lm_list *, Ent_desc *, Ofl_desc *, Lineno);
243void	Dbg32_map_ent_ord_title(Lm_list *, const char *);
244void	Dbg64_map_ent_ord_title(Lm_list *, const char *);
245void	Dbg32_map_hdr_noalloc(Lm_list *, Lineno);
246void	Dbg64_map_hdr_noalloc(Lm_list *, Lineno);
247void	Dbg32_map_parse(Lm_list *, const char *, int);
248void	Dbg64_map_parse(Lm_list *, const char *, int);
249void	Dbg32_map_pass(Lm_list *, Boolean, const char *, ulong_t, const char *);
250void	Dbg64_map_pass(Lm_list *, Boolean, const char *, ulong_t, const char *);
251void	Dbg32_map_post_title(Lm_list *);
252void	Dbg64_map_post_title(Lm_list *);
253void	Dbg32_map_seg_os_order(Lm_list *, Sg_desc *, const char *,
254	    Elf32_Word, Lineno);
255void	Dbg64_map_seg_os_order(Lm_list *, Sg_desc *, const char *,
256	    Elf64_Word, Lineno);
257void	Dbg32_map_seg(Ofl_desc *, uint_t, int, Sg_desc *, Lineno);
258void	Dbg64_map_seg(Ofl_desc *, uint_t, int, Sg_desc *, Lineno);
259void	Dbg32_map_size_new(Lm_list *, const char *, const char *, Lineno);
260void	Dbg64_map_size_new(Lm_list *, const char *, const char *, Lineno);
261void	Dbg32_map_size_old(Ofl_desc *, Sym_desc *, const char *, Lineno);
262void	Dbg64_map_size_old(Ofl_desc *, Sym_desc *, const char *, Lineno);
263void	Dbg32_map_sort_title(Lm_list *, Boolean);
264void	Dbg64_map_sort_title(Lm_list *, Boolean);
265void	Dbg32_map_sort_seg(Lm_list *, uchar_t, Elf32_Half, Sg_desc *);
266void	Dbg64_map_sort_seg(Lm_list *, uchar_t, Elf64_Half, Sg_desc *);
267void	Dbg32_map_symbol(Ofl_desc *, Sym_desc *);
268void	Dbg64_map_symbol(Ofl_desc *, Sym_desc *);
269void	Dbg32_map_version(Lm_list *, const char *, const char *, int);
270void	Dbg64_map_version(Lm_list *, const char *, const char *, int);
271
272void	Dbg32_move_adjexpandreloc(Lm_list *, Elf32_Word, const char *);
273void	Dbg64_move_adjexpandreloc(Lm_list *, Elf64_Xword, const char *);
274void	Dbg32_move_adjmovereloc(Lm_list *, Elf32_Word, Elf32_Word,
275	    const char *);
276void	Dbg64_move_adjmovereloc(Lm_list *, Elf64_Xword, Elf64_Xword,
277	    const char *);
278void	Dbg32_move_bad(Lm_list *, ulong_t, const char *, Addr);
279void	Dbg64_move_bad(Lm_list *, ulong_t, const char *, Addr);
280void	Dbg32_move_data(Rt_map *);
281void	Dbg64_move_data(Rt_map *);
282void	Dbg32_move_entry1(Lm_list *, int, Move *, Sym_desc *);
283void	Dbg64_move_entry1(Lm_list *, int, Move *, Sym_desc *);
284void	Dbg32_move_entry2(Lm_list *, Elf32_Move *, Elf32_Word, const char *);
285void	Dbg64_move_entry2(Lm_list *, Elf64_Move *, Elf64_Word, const char *);
286void	Dbg32_move_expand(Lm_list *, Elf32_Move *, Elf32_Addr);
287void	Dbg64_move_expand(Lm_list *, Elf64_Move *, Elf64_Addr);
288void	Dbg32_move_input(Lm_list *, const char *);
289void	Dbg64_move_input(Lm_list *, const char *);
290void	Dbg32_move_outmove(Lm_list *, const char *);
291void	Dbg64_move_outmove(Lm_list *, const char *);
292void	Dbg32_move_outsctadj(Lm_list *, Sym_desc *);
293void	Dbg64_move_outsctadj(Lm_list *, Sym_desc *);
294void	Dbg32_move_parexpn(Lm_list *, const char *, const char *);
295void	Dbg64_move_parexpn(Lm_list *, const char *, const char *);
296
297void	Dbg32_reloc_apply_reg(Lm_list *, int, Elf32_Half, Elf32_Word,
298	    Elf32_Word);
299void	Dbg64_reloc_apply_reg(Lm_list *, int, Elf64_Half, Elf64_Xword,
300	    Elf64_Xword);
301void	Dbg32_reloc_apply_val(Lm_list *, int, Elf32_Word, Elf32_Word);
302void	Dbg64_reloc_apply_val(Lm_list *, int, Elf64_Xword, Elf64_Xword);
303void	Dbg32_reloc_ars_entry(Lm_list *, int, Elf32_Word, Elf32_Half, Rel_desc *);
304void	Dbg64_reloc_ars_entry(Lm_list *, int, Elf64_Word, Elf64_Half, Rel_desc *);
305void	Dbg32_reloc_copy(Rt_map *, Rt_map *, const char *, int);
306void	Dbg64_reloc_copy(Rt_map *, Rt_map *, const char *, int);
307void	Dbg32_reloc_discard(Lm_list *, Elf32_Half, Rel_desc *);
308void	Dbg64_reloc_discard(Lm_list *, Elf64_Half, Rel_desc *);
309void	Dbg32_reloc_doact(Lm_list *, int, Elf32_Half, Elf32_Word, Rel_desc *,
310	    Elf32_Word, Elf32_Word, rel_desc_sname_func_t);
311void	Dbg64_reloc_doact(Lm_list *, int, Elf64_Half, Elf64_Word, Rel_desc *,
312	    Elf64_Xword, Elf64_Xword, rel_desc_sname_func_t);
313void	Dbg32_reloc_doact_title(Lm_list *);
314void	Dbg64_reloc_doact_title(Lm_list *);
315void	Dbg32_reloc_dooutrel(Lm_list *, Elf32_Word);
316void	Dbg64_reloc_dooutrel(Lm_list *, Elf64_Word);
317void	Dbg32_reloc_entry(Lm_list *, const char *, Elf32_Half, Elf32_Word,
318	    void *, const char *, const char *, const char *);
319void	Dbg64_reloc_entry(Lm_list *, const char *, Elf64_Half, Elf64_Word,
320	    void *, const char *, const char *, const char *);
321void	Dbg32_reloc_error(Lm_list *, int, Elf32_Half, Elf32_Word, void *,
322	    const char *);
323void	Dbg64_reloc_error(Lm_list *, int, Elf64_Half, Elf64_Word, void *,
324	    const char *);
325void	Dbg32_reloc_generate(Lm_list *, Os_desc *, Elf32_Word);
326void	Dbg64_reloc_generate(Lm_list *, Os_desc *, Elf64_Word);
327void	Dbg32_reloc_in(Lm_list *, int, Elf32_Half, Elf32_Word, void *,
328	    const char *, Elf32_Word, const char *);
329void	Dbg64_reloc_in(Lm_list *, int, Elf64_Half, Elf64_Word, void *,
330	    const char *, Elf64_Word, const char *);
331void	Dbg32_reloc_ors_entry(Lm_list *, int, Elf32_Word, Elf32_Half, Rel_desc *);
332void	Dbg64_reloc_ors_entry(Lm_list *, int, Elf64_Word, Elf64_Half, Rel_desc *);
333void	Dbg32_reloc_out(Ofl_desc *, int, Elf32_Word, void *, const char *,
334	    const char *);
335void	Dbg64_reloc_out(Ofl_desc *, int, Elf64_Word, void *, const char *,
336	    const char *);
337void	Dbg32_reloc_proc(Lm_list *, Os_desc *, Is_desc *, Is_desc *);
338void	Dbg64_reloc_proc(Lm_list *, Os_desc *, Is_desc *, Is_desc *);
339void	Dbg32_reloc_run(Rt_map *, uint_t, int, int);
340void	Dbg64_reloc_run(Rt_map *, uint_t, int, int);
341void	Dbg32_reloc_transition(Lm_list *, Elf32_Half, Elf32_Word, Rel_desc *,
342	    rel_desc_sname_func_t);
343void	Dbg64_reloc_transition(Lm_list *, Elf64_Half, Elf64_Word, Rel_desc *,
344	    rel_desc_sname_func_t);
345
346void	Dbg32_sec_added(Lm_list *, Os_desc *, Sg_desc *);
347void	Dbg64_sec_added(Lm_list *, Os_desc *, Sg_desc *);
348void	Dbg32_sec_backing(Lm_list *);
349void	Dbg64_sec_backing(Lm_list *);
350void	Dbg32_sec_created(Lm_list *, Os_desc *, Sg_desc *);
351void	Dbg64_sec_created(Lm_list *, Os_desc *, Sg_desc *);
352void	Dbg32_sec_discarded(Lm_list *, Is_desc *, Is_desc *);
353void	Dbg64_sec_discarded(Lm_list *, Is_desc *, Is_desc *);
354void	Dbg32_sec_group(Lm_list *, Is_desc *, Group_desc *);
355void	Dbg64_sec_group(Lm_list *, Is_desc *, Group_desc *);
356void	Dbg32_sec_gnu_comdat(Lm_list *, Is_desc *, Boolean, Boolean);
357void	Dbg64_sec_gnu_comdat(Lm_list *, Is_desc *, Boolean, Boolean);
358void	Dbg32_sec_in(Lm_list *, Is_desc *);
359void	Dbg64_sec_in(Lm_list *, Is_desc *);
360void	Dbg32_sec_order_error(Lm_list *, Ifl_desc *, Elf32_Word, int);
361void	Dbg64_sec_order_error(Lm_list *, Ifl_desc *, Elf64_Word, int);
362void	Dbg32_sec_order_list(Ofl_desc *, int);
363void	Dbg64_sec_order_list(Ofl_desc *, int);
364void	Dbg32_sec_redirected(Lm_list *, Is_desc *, const char *);
365void	Dbg64_sec_redirected(Lm_list *, Is_desc *, const char *);
366void	Dbg32_sec_strtab(Lm_list *, Os_desc *, Str_tbl *);
367void	Dbg64_sec_strtab(Lm_list *, Os_desc *, Str_tbl *);
368
369void	Dbg32_seg_desc_entry(Lm_list *, uchar_t, Elf32_Half, int, Sg_desc *,
370	    Boolean);
371void	Dbg64_seg_desc_entry(Lm_list *, uchar_t, Elf64_Half, int, Sg_desc *,
372	    Boolean);
373void	Dbg32_seg_entry(Ofl_desc *, int, Sg_desc *);
374void	Dbg64_seg_entry(Ofl_desc *, int, Sg_desc *);
375void	Dbg32_seg_list(Lm_list *, uchar_t, Elf32_Half, APlist *);
376void	Dbg64_seg_list(Lm_list *, uchar_t, Elf64_Half, APlist *);
377void	Dbg32_seg_os(Ofl_desc *, Os_desc *, int);
378void	Dbg64_seg_os(Ofl_desc *, Os_desc *, int);
379void    Dbg32_seg_title(Lm_list *);
380void    Dbg64_seg_title(Lm_list *);
381
382void	Dbg32_shdr_modified(Lm_list *, const char *, uchar_t, Half,
383	    Elf32_Word, Shdr *, Shdr *, const char *);
384void	Dbg64_shdr_modified(Lm_list *, const char *, uchar_t, Half,
385	    Elf64_Word, Shdr *, Shdr *, const char *);
386
387void	Dbg32_statistics_ar(Ofl_desc *);
388void	Dbg64_statistics_ar(Ofl_desc *);
389void	Dbg32_statistics_ld(Ofl_desc *);
390void	Dbg64_statistics_ld(Ofl_desc *);
391
392void	Dbg32_support_action(Lm_list *, const char *, const char *, Support_ndx,
393	    const char *);
394void	Dbg64_support_action(Lm_list *, const char *, const char *, Support_ndx,
395	    const char *);
396void	Dbg32_support_load(Lm_list *, const char *, const char *);
397void	Dbg64_support_load(Lm_list *, const char *, const char *);
398void	Dbg32_support_req(Lm_list *, const char *, int);
399void	Dbg64_support_req(Lm_list *, const char *, int);
400
401void	Dbg32_syminfo_entry(Lm_list *, Elf32_Word, Syminfo *, Sym *, const char *,
402	    Dyn *);
403void	Dbg64_syminfo_entry(Lm_list *, Elf64_Word, Syminfo *, Sym *, const char *,
404	    Dyn *);
405void	Dbg32_syminfo_title(Lm_list *);
406void	Dbg64_syminfo_title(Lm_list *);
407
408void	Dbg32_syms_ar_checking(Lm_list *, const char *, const char *,
409	    Elf_Arsym *);
410void	Dbg64_syms_ar_checking(Lm_list *, const char *, const char *,
411	    Elf_Arsym *);
412void	Dbg32_syms_ar_entry(Lm_list *, Xword, Elf_Arsym *);
413void	Dbg64_syms_ar_entry(Lm_list *, Xword, Elf_Arsym *);
414void	Dbg32_syms_ar_force(Lm_list *, const char *, const char *);
415void	Dbg64_syms_ar_force(Lm_list *, const char *, const char *);
416void	Dbg32_syms_ar_resolve(Lm_list *, const char *, const char *,
417	    Elf_Arsym *);
418void	Dbg64_syms_ar_resolve(Lm_list *, const char *, const char *,
419	    Elf_Arsym *);
420void	Dbg32_syms_ar_skip(Lm_list *, const char *, Elf_Arsym *);
421void	Dbg64_syms_ar_skip(Lm_list *, const char *, Elf_Arsym *);
422void	Dbg32_syms_ar_title(Lm_list *, const char *, Boolean);
423void	Dbg64_syms_ar_title(Lm_list *, const char *, Boolean);
424void	Dbg32_syms_cap_convert(Ofl_desc *, Word, const char *, Sym *);
425void	Dbg64_syms_cap_convert(Ofl_desc *, Word, const char *, Sym *);
426void	Dbg32_syms_cap_local(Ofl_desc *, Word, const char *, Sym *, Sym_desc *);
427void	Dbg64_syms_cap_local(Ofl_desc *, Word, const char *, Sym *, Sym_desc *);
428void	Dbg32_syms_cap_lookup(Rt_map *, uint_t, const char *, uint_t, Half,
429	    Syscapset *);
430void	Dbg64_syms_cap_lookup(Rt_map *, uint_t, const char *, uint_t, Half,
431	    Syscapset *);
432void	Dbg32_syms_cap_title(Ofl_desc *);
433void	Dbg64_syms_cap_title(Ofl_desc *);
434void	Dbg32_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word);
435void	Dbg64_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word);
436void	Dbg32_syms_created(Lm_list *, const char *);
437void	Dbg64_syms_created(Lm_list *, const char *);
438void	Dbg32_syms_discarded(Lm_list *, Sym_desc *);
439void	Dbg64_syms_discarded(Lm_list *, Sym_desc *);
440void	Dbg32_syms_entered(Ofl_desc *, Sym *, Sym_desc *);
441void	Dbg64_syms_entered(Ofl_desc *, Sym *, Sym_desc *);
442void	Dbg32_syms_entry(Lm_list *, Elf32_Word, Sym_desc *);
443void	Dbg64_syms_entry(Lm_list *, Elf64_Word, Sym_desc *);
444void	Dbg32_syms_global(Lm_list *, Elf32_Word, const char *);
445void	Dbg64_syms_global(Lm_list *, Elf64_Word, const char *);
446void	Dbg32_syms_ignore(Ofl_desc *, Sym_desc *);
447void	Dbg64_syms_ignore(Ofl_desc *, Sym_desc *);
448void	Dbg32_syms_lazy_rescan(Lm_list *, const char *);
449void	Dbg64_syms_lazy_rescan(Lm_list *, const char *);
450void	Dbg32_syms_lookup(Rt_map *, const char *, const char *);
451void	Dbg64_syms_lookup(Rt_map *, const char *, const char *);
452void	Dbg32_syms_lookup_aout(Lm_list *, const char *);
453void	Dbg32_syms_new(Ofl_desc *, Sym *, Sym_desc *);
454void	Dbg64_syms_new(Ofl_desc *, Sym *, Sym_desc *);
455void	Dbg32_syms_old(Ofl_desc *, Sym_desc *);
456void	Dbg64_syms_old(Ofl_desc *, Sym_desc *);
457void	Dbg32_syms_process(Lm_list *, Ifl_desc *);
458void	Dbg64_syms_process(Lm_list *, Ifl_desc *);
459void	Dbg32_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *);
460void	Dbg64_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *);
461void	Dbg32_syms_resolved(Ofl_desc *, Sym_desc *);
462void	Dbg64_syms_resolved(Ofl_desc *, Sym_desc *);
463void	Dbg32_syms_resolving(Ofl_desc *, Elf32_Word, const char *, int, int,
464	    Sym *, Sym *, Sym_desc *, Ifl_desc *);
465void	Dbg64_syms_resolving(Ofl_desc *, Elf64_Word, const char *, int, int,
466	    Sym *, Sym *, Sym_desc *, Ifl_desc *);
467void	Dbg32_syms_sec_entry(Lm_list *, Elf32_Word, Sg_desc *, Os_desc *);
468void	Dbg64_syms_sec_entry(Lm_list *, Elf64_Word, Sg_desc *, Os_desc *);
469void	Dbg32_syms_sec_title(Lm_list *);
470void	Dbg64_syms_sec_title(Lm_list *);
471void	Dbg32_syms_spec_title(Lm_list *);
472void	Dbg64_syms_spec_title(Lm_list *);
473void	Dbg32_syms_updated(Ofl_desc *, Sym_desc *, const char *);
474void	Dbg64_syms_updated(Ofl_desc *, Sym_desc *, const char *);
475void	Dbg32_syms_up_title(Lm_list *);
476void	Dbg64_syms_up_title(Lm_list *);
477void	Dbg32_syms_wrap(Lm_list *, Elf32_Word, const char *, const char *);
478void	Dbg64_syms_wrap(Lm_list *, Elf64_Word, const char *, const char *);
479
480void	Dbg32_util_broadcast(Rt_map *);
481void	Dbg64_util_broadcast(Rt_map *);
482void	Dbg32_util_call_array(Rt_map *, void *, int, Elf32_Word);
483void	Dbg64_util_call_array(Rt_map *, void *, int, Elf64_Word);
484void	Dbg32_util_call_fini(Rt_map *);
485void	Dbg64_util_call_fini(Rt_map *);
486void	Dbg32_util_call_init(Rt_map *, int);
487void	Dbg64_util_call_init(Rt_map *, int);
488void	Dbg32_util_call_main(Rt_map *);
489void	Dbg64_util_call_main(Rt_map *);
490void	Dbg32_util_collect(Rt_map *, int, int);
491void	Dbg64_util_collect(Rt_map *, int, int);
492void	Dbg32_util_dbnotify(Lm_list *, rd_event_e, r_state_e);
493void	Dbg64_util_dbnotify(Lm_list *, rd_event_e, r_state_e);
494void	Dbg32_util_edge_in(Lm_list *, Rt_map *, uint_t, Rt_map *, int, int);
495void	Dbg64_util_edge_in(Lm_list *, Rt_map *, uint_t, Rt_map *, int, int);
496void	Dbg32_util_edge_out(Rt_map *, Rt_map *);
497void	Dbg64_util_edge_out(Rt_map *, Rt_map *);
498void	Dbg32_util_intoolate(Rt_map *);
499void	Dbg64_util_intoolate(Rt_map *);
500void    Dbg32_util_lcinterface(Rt_map *, int, char *);
501void    Dbg64_util_lcinterface(Rt_map *, int, char *);
502void	Dbg32_util_nl(Lm_list *, int);
503void	Dbg64_util_nl(Lm_list *, int);
504void	Dbg32_util_no_init(Rt_map *);
505void	Dbg64_util_no_init(Rt_map *);
506void	Dbg32_util_scc_entry(Rt_map *, uint_t);
507void	Dbg64_util_scc_entry(Rt_map *, uint_t);
508void	Dbg32_util_scc_title(Lm_list *, int);
509void	Dbg64_util_scc_title(Lm_list *, int);
510void	Dbg32_util_str(Lm_list *, const char  *);
511void	Dbg64_util_str(Lm_list *, const char  *);
512void	Dbg32_util_wait(Rt_map *, Rt_map *, int);
513void	Dbg64_util_wait(Rt_map *, Rt_map *, int);
514
515void	Dbg32_unused_file(Lm_list *, const char *, int, uint_t);
516void	Dbg64_unused_file(Lm_list *, const char *, int, uint_t);
517void    Dbg32_unused_lcinterface(Rt_map *, Rt_map *, int);
518void    Dbg64_unused_lcinterface(Rt_map *, Rt_map *, int);
519void	Dbg32_unused_path(Lm_list *, const char *, uint_t, uint_t,
520	    const char *);
521void	Dbg64_unused_path(Lm_list *, const char *, uint_t, uint_t,
522	    const char *);
523void	Dbg32_unused_sec(Lm_list *, Is_desc *);
524void	Dbg64_unused_sec(Lm_list *, Is_desc *);
525void	Dbg32_unused_unref(Rt_map *, const char *);
526void	Dbg64_unused_unref(Rt_map *, const char *);
527
528void	Dbg32_ver_need_done(Lm_list *);
529void	Dbg64_ver_need_done(Lm_list *);
530void	Dbg32_ver_need_entry(Lm_list *, Half, const char *, const char *);
531void	Dbg64_ver_need_entry(Lm_list *, Half, const char *, const char *);
532void	Dbg32_ver_need_title(Lm_list *, const char *);
533void	Dbg64_ver_need_title(Lm_list *, const char *);
534
535const char *Elf_demangle_name(const char *);
536
537void Elf_syminfo_entry(Lm_list *, Word, Syminfo *, const char *, const char *);
538void Elf_syminfo_title(Lm_list *);
539void Elf_ver_def_title(Lm_list *);
540void Elf_ver_need_title(Lm_list *, int);
541void Elf_ver_line_1(Lm_list *, const char *, const char *, const char *,
542    const char *);
543void Elf_ver_line_2(Lm_list *, const char *, const char *);
544void Elf_ver_line_3(Lm_list *, const char *, const char *, const char *);
545void Elf_ver_line_4(Lm_list *, const char *);
546void Elf_ver_line_5(Lm_list *, const char *, const char *);
547
548void Elf64_cap_entry(Lm_list *, Elf64_Cap *, int ndx, const char *, size_t,
549    Elf64_Half);
550void Elf32_cap_entry(Lm_list *, Elf32_Cap *, int ndx, const char *, size_t,
551    Elf32_Half);
552void Elf64_cap_title(Lm_list *);
553void Elf32_cap_title(Lm_list *);
554
555void Elf64_dyn_entry(Lm_list *, Elf64_Dyn *, int, const char *, uchar_t,
556    Elf64_Half);
557void Elf32_dyn_entry(Lm_list *, Elf32_Dyn *, int, const char *, uchar_t,
558    Elf32_Half);
559void Elf64_dyn_null_entry(Lm_list *, Elf64_Dyn *, int, int);
560void Elf32_dyn_null_entry(Lm_list *, Elf32_Dyn *, int, int);
561void Elf64_dyn_title(Lm_list *);
562void Elf32_dyn_title(Lm_list *);
563
564void Elf64_ehdr(Lm_list *, Elf64_Ehdr *, Elf64_Shdr *);
565void Elf32_ehdr(Lm_list *, Elf32_Ehdr *, Elf32_Shdr *);
566
567void Elf64_got_entry(Lm_list *, Elf64_Sword, Elf64_Addr, Elf64_Xword,
568    Elf64_Half, uchar_t, uchar_t, Elf64_Word, void *, const char *);
569void Elf32_got_entry(Lm_list *, Elf32_Sword, Elf32_Addr, Elf32_Word,
570    Elf32_Half, uchar_t, uchar_t, Elf32_Word, void *, const char *);
571void Elf64_got_title(Lm_list *);
572void Elf32_got_title(Lm_list *);
573
574void Elf64_phdr(Lm_list *, uchar_t, Elf64_Half, Elf64_Phdr *);
575void Elf32_phdr(Lm_list *, uchar_t, Elf32_Half, Elf32_Phdr *);
576
577void Elf64_reloc_apply_reg(Lm_list *, int, Elf64_Half, Elf64_Xword,
578    Elf64_Xword);
579void Elf32_reloc_apply_reg(Lm_list *, int, Elf32_Half, Elf32_Word,
580    Elf32_Word);
581void Elf64_reloc_apply_val(Lm_list *, int, Elf64_Xword, Elf64_Xword);
582void Elf32_reloc_apply_val(Lm_list *, int, Elf32_Word, Elf32_Word);
583void Elf64_reloc_entry_1(Lm_list *, int, const char *, Elf64_Half, Word, void *,
584    const char *, const char *, const char *);
585void Elf32_reloc_entry_1(Lm_list *, int, const char *, Elf32_Half, Word, void *,
586    const char *, const char *, const char *);
587void Elf64_reloc_entry_2(Lm_list *, int, const char *, Word, const char *,
588    Elf64_Addr, Elf64_Sxword, const char *, const char *, const char *);
589void Elf32_reloc_entry_2(Lm_list *, int, const char *, Word, const char *,
590    Elf32_Addr, Elf32_Sword, const char *, const char *, const char *);
591void Elf64_reloc_title(Lm_list *, int, Word);
592void Elf32_reloc_title(Lm_list *, int, Word);
593
594void Elf64_shdr(Lm_list *, uchar_t, Elf64_Half, Elf64_Shdr *);
595void Elf32_shdr(Lm_list *, uchar_t, Elf32_Half, Elf32_Shdr *);
596
597void Elf64_syms_table_entry(Lm_list *, int, const char *, uchar_t, Elf64_Half,
598    Elf64_Sym *, Elf64_Versym, int, const char *, const char *);
599void Elf32_syms_table_entry(Lm_list *, int, const char *, uchar_t, Elf32_Half,
600    Elf32_Sym *, Elf32_Versym, int, const char *, const char *);
601void Elf64_syms_table_title(Lm_list *, int);
602void Elf32_syms_table_title(Lm_list *, int);
603