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