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