summaryrefslogtreecommitdiff
path: root/usr/src/cmd/sgs/liblddbg/common/llib-llddbg
blob: e3a43c6e0c61167f1e436bbfbb7a2e92a1faf97d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */
/* LINTLIBRARY */
/* PROTOLIB1 */

/*
 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
 */

#include <sys/types.h>
#include <sys/auxv.h>
#include <debug.h>

int	Dbg_setup(dbg_setup_caller_t, const char *, Dbg_desc *, const char **);
void	Dbg_help(void);
void	Dbg_version(void);
const char *
	Dbg_demangle_name(const char *);

void	Dbg_args_file(Lm_list *, int, char *);
void	Dbg_args_guidance_unknown(Lm_list *, const char *);
void	Dbg_args_option(Lm_list *, int, int, char *);
void	Dbg_args_str2chr(Lm_list *, int, const char *, int);
void	Dbg_args_Wldel(Lm_list *, int, const char *);
void	Dbg_audit_activity(Lm_list *, const char *, const char *, uint_t);
void	Dbg_audit_ignore(Rt_map *);
void	Dbg_audit_interface(Lm_list *, const char *, const char *);
void	Dbg_audit_lib(Rt_map *, const char *, int);
void	Dbg_audit_objclose(Lm_list *, const char *, const char *);
void	Dbg_audit_objfilter(Lm_list *, int, const char *, const char *,
	    const char *, const char *);
void	Dbg_audit_objopen(Lm_list *, int, const char *, const char *, uint_t,
	    Boolean);
void	Dbg_audit_objsearch(Lm_list *, int, const char *, const char *, uint_t,
	    const char *);
void	Dbg_audit_pltenter(Lm_list *, int, const char *, const char *, Addr);
void	Dbg_audit_pltexit(Lm_list *, const char *, const char *);
void	Dbg_audit_preinit(Lm_list *, const char *, const char *);
void	Dbg_audit_symbind(Lm_list *, int, const char *, const char *,
	    Addr, uint_t);
void	Dbg_audit_skip(Lm_list *, const char *, const char *);
void	Dbg_audit_terminate(Lm_list *, const char *);
void	Dbg_audit_version(Lm_list *, const char *, uint_t, uint_t);

void	Dbg_basic_collect(Lm_list *);
void	Dbg_basic_create(Lm_list *);
void	Dbg_basic_files(Lm_list *);
void	Dbg_basic_finish(Lm_list *);
void	Dbg_basic_options(Lm_list *);
void	Dbg_basic_relocate(Lm_list *);
void	Dbg_basic_validate(Lm_list *);

void	Dbg_tls_modactivity(Lm_list *, void *, uint_t);
void	Dbg_tls_static_block(Lm_list *, void *, ulong_t, ulong_t);
void	Dbg_tls_static_resv(Rt_map *, ulong_t, ulong_t);

void	Dbg32_bind_global(Rt_map *, Elf32_Addr, Elf32_Off, Elf32_Word,
	    Pltbindtype, Rt_map *, Elf32_Addr, Elf32_Off, const char *, uint_t);
void	Dbg64_bind_global(Rt_map *, Elf64_Addr, Elf64_Off, Elf64_Xword,
	    Pltbindtype, Rt_map *, Elf64_Addr, Elf64_Off, const char *, uint_t);
void	Dbg64_bind_pltpad_to(Rt_map *, Addr, const char *, const char *);
void	Dbg64_bind_pltpad_from(Rt_map *, Addr, const char *);
void	Dbg32_bind_reject(Rt_map *, Rt_map *, const char *, int);
void	Dbg64_bind_reject(Rt_map *, Rt_map *, const char *, int);
void	Dbg32_bind_weak(Rt_map *, Elf32_Addr, Elf32_Addr, const char *);
void	Dbg64_bind_weak(Rt_map *, Elf64_Addr, Elf64_Addr, const char *);

void	Dbg32_cap_candidate(Lm_list *, const char *);
void	Dbg64_cap_candidate(Lm_list *, const char *);
void	Dbg32_cap_filter(Lm_list *, const char *, Rt_map *);
void	Dbg64_cap_filter(Lm_list *, const char *, Rt_map *);
void	Dbg32_cap_id(Lm_list *, Lineno, const char *, const char *);
void	Dbg64_cap_id(Lm_list *, Lineno, const char *, const char *);
void	Dbg32_cap_identical(Lm_list *, const char *, const char *);
void	Dbg64_cap_identical(Lm_list *, const char *, const char *);
void	Dbg32_cap_mapfile_title(Lm_list *, Lineno);
void	Dbg64_cap_mapfile_title(Lm_list *, Lineno);
void	Dbg32_cap_post_title(Lm_list *, int *);
void	Dbg64_cap_post_title(Lm_list *, int *);
void	Dbg32_cap_out_title(Lm_list *);
void	Dbg64_cap_out_title(Lm_list *);
void	Dbg32_cap_sec_title(Lm_list *, const char *);
void	Dbg64_cap_sec_title(Lm_list *, const char *);
void	Dbg32_cap_val(Lm_list *, Syscapset *, Syscapset *, Elf32_Half);
void	Dbg64_cap_val(Lm_list *, Syscapset *, Syscapset *, Elf64_Half);

void	Dbg32_dl_dladdr(Rt_map *, void *);
void	Dbg64_dl_dladdr(Rt_map *, void *);
void	Dbg32_dl_dlclose(Rt_map *, const char *, int);
void	Dbg64_dl_dlclose(Rt_map *, const char *, int);
void	Dbg32_dl_dldump(Rt_map *, const char *, const char *, int);
void	Dbg64_dl_dldump(Rt_map *, const char *, const char *, int);
void	Dbg32_dl_dlerror(Rt_map *, const char *);
void	Dbg64_dl_dlerror(Rt_map *, const char *);
void	Dbg32_dl_dlinfo(Rt_map *, const char *, int, void *);
void	Dbg64_dl_dlinfo(Rt_map *, const char *, int, void *);
void	Dbg32_dl_dlopen(Rt_map *, const char *, int *, int);
void	Dbg64_dl_dlopen(Rt_map *, const char *, int *, int);
void	Dbg32_dl_dlsym(Rt_map *, const char *, int *, const char *, int);
void	Dbg64_dl_dlsym(Rt_map *, const char *, int *, const char *, int);
void	Dbg32_dl_iphdr_callback(Lm_list *, struct dl_phdr_info *);
void	Dbg64_dl_iphdr_callback(Lm_list *, struct dl_phdr_info *);
void	Dbg32_dl_iphdr_enter(Rt_map *, u_longlong_t, u_longlong_t);
void	Dbg64_dl_iphdr_enter(Rt_map *, u_longlong_t, u_longlong_t);
void	Dbg32_dl_iphdr_mapchange(Lm_list *, u_longlong_t, u_longlong_t);
void	Dbg64_dl_iphdr_mapchange(Lm_list *, u_longlong_t, u_longlong_t);
void	Dbg32_dl_iphdr_unmap_ret(Lm_list *);
void	Dbg64_dl_iphdr_unmap_ret(Lm_list *);

void	Dbg32_ent_print(Lm_list *, uchar_t, Elf32_Half, APlist *);
void	Dbg64_ent_print(Lm_list *, uchar_t, Elf64_Half, APlist *);

void	Dbg32_file_analyze(Rt_map *);
void	Dbg64_file_analyze64(Rt_map *);
void	Dbg32_file_aout(Lm_list *, const char *, Addr, size_t, const char *,
	    Aliste);
void	Dbg64_file_aout(Lm_list *, const char *, Addr, size_t, const char *,
	    Aliste);
void	Dbg32_file_ar(Lm_list *, const char *, Boolean);
void	Dbg64_file_ar(Lm_list *, const char *, Boolean);
void	Dbg32_file_archive(Lm_list *, const char *, int);
void	Dbg64_file_archive(Lm_list *, const char *, int);
void	Dbg32_file_bind_entry(Lm_list *, Bnd_desc *);
void	Dbg64_file_bind_entry(Lm_list *, Bnd_desc *);
void	Dbg32_file_bindings(Rt_map *, int);
void	Dbg64_file_bindings(Rt_map *, int);
void	Dbg32_file_bindings_done(Lm_list *);
void	Dbg64_file_bindings_done(Lm_list *);
void	Dbg32_file_config_dis(Lm_list *, const char *, int);
void	Dbg64_file_config_dis(Lm_list *, const char *, int);
void	Dbg32_file_config_obj(Lm_list *, const char *, const char *,
	    const char *);
void	Dbg64_file_config_obj(Lm_list *, const char *, const char *,
	    const char *);
void	Dbg32_file_cntl(Lm_list *, Aliste, Aliste);
void	Dbg64_file_cntl(Lm_list *, Aliste, Aliste);
void	Dbg32_file_cleanup(Lm_list *, const char *, Aliste);
void	Dbg64_file_cleanup(Lm_list *, const char *, Aliste);
void	Dbg32_file_deferred(Lm_list *, const char *, const char *);
void	Dbg64_file_deferred(Lm_list *, const char *, const char *);
void	Dbg32_file_del_rescan(Lm_list *);
void	Dbg64_file_del_rescan(Lm_list *);
void	Dbg32_file_delete(Rt_map *);
void	Dbg64_file_delete(Rt_map *);
void	Dbg32_file_elf(Lm_list *, const char *, Addr, size_t, const char *,
	    Aliste);
void	Dbg64_file_elf(Lm_list *, const char *, Addr, size_t, const char *,
	    Aliste);
void	Dbg32_file_filtee(Lm_list *, const char *, const char *, int);
void	Dbg64_file_filtee(Lm_list *, const char *, const char *, int);
void	Dbg32_file_filter(Lm_list *, const char *, const char *, int);
void	Dbg64_file_filter(Lm_list *, const char *, const char *, int);
void	Dbg64_file_fixname(Lm_list *, const char *, const char *);
void	Dbg32_file_fixname(Lm_list *, const char *, const char *);
void	Dbg32_file_hdl_action(Grp_hdl *, Rt_map *, int, uint_t);
void	Dbg64_file_hdl_action(Grp_hdl *, Rt_map *, int, uint_t);
void	Dbg32_file_hdl_collect(Grp_hdl *, const char *);
void	Dbg64_file_hdl_collect(Grp_hdl *, const char *);
void	Dbg32_file_hdl_title(int);
void	Dbg64_file_hdl_title(int);
void	Dbg64_file_lazyload(Rt_map *, const char *, const char *);
void	Dbg32_file_lazyload(Rt_map *, const char *, const char *);
void	Dbg32_file_ldso(Rt_map *, char **, auxv_t *, const char *, Aliste);
void	Dbg64_file_ldso(Rt_map *, char **, auxv_t *, const char *, Aliste);
void	Dbg32_file_mmapobj(Lm_list *, const char *, mmapobj_result_t *, uint_t);
void	Dbg64_file_mmapobj(Lm_list *, const char *, mmapobj_result_t *, uint_t);
void	Dbg32_file_mode_promote(Rt_map *, int);
void	Dbg64_file_mode_promote(Rt_map *, int);
void	Dbg32_file_modified(Lm_list *, const char *, const char *, const char *,
	    int, int, Elf *, Elf *);
void	Dbg64_file_modified(Lm_list *, const char *, const char *, const char *,
	    int, int, Elf *, Elf *);
void	Dbg32_file_needed(Rt_map *, const char *);
void	Dbg64_file_needed(Rt_map *, const char *);
void	Dbg32_file_output(Ofl_desc *);
void	Dbg64_file_output64(Ofl_desc *);
void	Dbg32_file_preload(Lm_list *, const char *);
void	Dbg64_file_preload(Lm_list *, const char *);
void	Dbg32_file_prot(Rt_map *, int);
void	Dbg64_file_prot(Rt_map *, int);
void	Dbg32_file_rejected(Lm_list *, Rej_desc *, Elf32_Half);
void	Dbg64_file_rejected(Lm_list *, Rej_desc *, Elf32_Half);
void	Dbg32_file_reuse(Lm_list *, const char *, const char *);
void	Dbg64_file_reuse(Lm_list *, const char *, const char *);
void	Dbg32_file_skip(Lm_list *, const char *, const char *);
void	Dbg64_file_skip(Lm_list *, const char *, const char *);

void	Dbg32_got_display(Ofl_desc *, Elf32_Off, int,
	    Elf32_Word, size_t m_got_entsize);
void	Dbg64_got_display(Ofl_desc *, Elf64_Off, int,
	    Elf64_Word, size_t m_got_entsize);

void	Dbg32_libs_audit(Lm_list *, const char *, const char *);
void	Dbg64_libs_audit(Lm_list *, const char *, const char *);
void	Dbg32_libs_find(Lm_list *, const char *);
void	Dbg64_libs_find(Lm_list *, const char *);
void	Dbg32_libs_found(Lm_list *, const char *, int);
void	Dbg64_libs_found(Lm_list *, const char *, int);
void	Dbg32_libs_insecure(Lm_list *, const char *, int);
void	Dbg64_libs_insecure(Lm_list *, const char *, int);
void	Dbg32_libs_init(Lm_list *, APlist *, APlist *);
void	Dbg64_libs_init(Lm_list *, APlist *, APlist *);
void	Dbg32_libs_l(Lm_list *, const char *, const char *);
void	Dbg64_libs_l(Lm_list *, const char *, const char *);
void	Dbg32_libs_path(Lm_list *, const char *, uint_t, const char *);
void	Dbg64_libs_path(Lm_list *, const char *, uint_t, const char *);
void	Dbg32_libs_req(Lm_list *, const char *, const char *, const char *);
void	Dbg64_libs_req(Lm_list *, const char *, const char *, const char *);
void	Dbg32_libs_update(Lm_list *, APlist *, APlist *);
void	Dbg64_libs_update(Lm_list *, APlist *, APlist *);
void	Dbg32_libs_yp(Lm_list *, const char *);
void	Dbg64_libs_yp(Lm_list *, const char *);
void	Dbg32_libs_ylu(Lm_list *, const char *, const char *, int);
void	Dbg64_libs_ylu(Lm_list *, const char *, const char *, int);

void	Dbg32_map_cexp_id(Lm_list *, Boolean, const char *, ulong_t,
	    const char *);
void	Dbg64_map_cexp_id(Lm_list *, Boolean, const char *, ulong_t,
	    const char *);
void	Dbg32_map_dv(Lm_list *, const char *, Lineno);
void	Dbg64_map_dv(Lm_list *, const char *, Lineno);
void	Dbg32_map_dv_entry(Lm_list *, Lineno, int, const char *);
void	Dbg64_map_dv_entry(Lm_list *, Lineno, int, const char *);
void	Dbg32_map_ent(Lm_list *, Ent_desc *, Ofl_desc *, Lineno);
void	Dbg64_map_ent(Lm_list *, Ent_desc *, Ofl_desc *, Lineno);
void	Dbg32_map_ent_ord_title(Lm_list *, const char *);
void	Dbg64_map_ent_ord_title(Lm_list *, const char *);
void	Dbg32_map_hdr_noalloc(Lm_list *, Lineno);
void	Dbg64_map_hdr_noalloc(Lm_list *, Lineno);
void	Dbg32_map_parse(Lm_list *, const char *, int);
void	Dbg64_map_parse(Lm_list *, const char *, int);
void	Dbg32_map_pass(Lm_list *, Boolean, const char *, ulong_t, const char *);
void	Dbg64_map_pass(Lm_list *, Boolean, const char *, ulong_t, const char *);
void	Dbg32_map_post_title(Lm_list *);
void	Dbg64_map_post_title(Lm_list *);
void	Dbg32_map_seg_os_order(Lm_list *, Sg_desc *, const char *,
	    Elf32_Word, Lineno);
void	Dbg64_map_seg_os_order(Lm_list *, Sg_desc *, const char *,
	    Elf64_Word, Lineno);
void	Dbg32_map_seg(Ofl_desc *, uint_t, int, Sg_desc *, Lineno);
void	Dbg64_map_seg(Ofl_desc *, uint_t, int, Sg_desc *, Lineno);
void	Dbg32_map_size_new(Lm_list *, const char *, const char *, Lineno);
void	Dbg64_map_size_new(Lm_list *, const char *, const char *, Lineno);
void	Dbg32_map_size_old(Ofl_desc *, Sym_desc *, const char *, Lineno);
void	Dbg64_map_size_old(Ofl_desc *, Sym_desc *, const char *, Lineno);
void	Dbg32_map_sort_title(Lm_list *, Boolean);
void	Dbg64_map_sort_title(Lm_list *, Boolean);
void	Dbg32_map_sort_seg(Lm_list *, uchar_t, Elf32_Half, Sg_desc *);
void	Dbg64_map_sort_seg(Lm_list *, uchar_t, Elf64_Half, Sg_desc *);
void	Dbg32_map_symbol(Ofl_desc *, Sym_desc *);
void	Dbg64_map_symbol(Ofl_desc *, Sym_desc *);
void	Dbg32_map_version(Lm_list *, const char *, const char *, int);
void	Dbg64_map_version(Lm_list *, const char *, const char *, int);

void	Dbg32_move_adjexpandreloc(Lm_list *, Elf32_Word, const char *);
void	Dbg64_move_adjexpandreloc(Lm_list *, Elf64_Xword, const char *);
void	Dbg32_move_adjmovereloc(Lm_list *, Elf32_Word, Elf32_Word,
	    const char *);
void	Dbg64_move_adjmovereloc(Lm_list *, Elf64_Xword, Elf64_Xword,
	    const char *);
void	Dbg32_move_bad(Lm_list *, ulong_t, const char *, Addr);
void	Dbg64_move_bad(Lm_list *, ulong_t, const char *, Addr);
void	Dbg32_move_data(Rt_map *);
void	Dbg64_move_data(Rt_map *);
void	Dbg32_move_entry1(Lm_list *, int, Move *, Sym_desc *);
void	Dbg64_move_entry1(Lm_list *, int, Move *, Sym_desc *);
void	Dbg32_move_entry2(Lm_list *, Elf32_Move *, Elf32_Word, const char *);
void	Dbg64_move_entry2(Lm_list *, Elf64_Move *, Elf64_Word, const char *);
void	Dbg32_move_expand(Lm_list *, Elf32_Move *, Elf32_Addr);
void	Dbg64_move_expand(Lm_list *, Elf64_Move *, Elf64_Addr);
void	Dbg32_move_input(Lm_list *, const char *);
void	Dbg64_move_input(Lm_list *, const char *);
void	Dbg32_move_outmove(Lm_list *, const char *);
void	Dbg64_move_outmove(Lm_list *, const char *);
void	Dbg32_move_outsctadj(Lm_list *, Sym_desc *);
void	Dbg64_move_outsctadj(Lm_list *, Sym_desc *);
void	Dbg32_move_parexpn(Lm_list *, const char *, const char *);
void	Dbg64_move_parexpn(Lm_list *, const char *, const char *);

void	Dbg32_reloc_apply_reg(Lm_list *, int, Elf32_Half, Elf32_Word,
	    Elf32_Word);
void	Dbg64_reloc_apply_reg(Lm_list *, int, Elf64_Half, Elf64_Xword,
	    Elf64_Xword);
void	Dbg32_reloc_apply_val(Lm_list *, int, Elf32_Word, Elf32_Word);
void	Dbg64_reloc_apply_val(Lm_list *, int, Elf64_Xword, Elf64_Xword);
void	Dbg32_reloc_ars_entry(Lm_list *, int, Elf32_Word, Elf32_Half, Rel_desc *);
void	Dbg64_reloc_ars_entry(Lm_list *, int, Elf64_Word, Elf64_Half, Rel_desc *);
void	Dbg32_reloc_copy(Rt_map *, Rt_map *, const char *, int);
void	Dbg64_reloc_copy(Rt_map *, Rt_map *, const char *, int);
void	Dbg32_reloc_discard(Lm_list *, Elf32_Half, Rel_desc *);
void	Dbg64_reloc_discard(Lm_list *, Elf64_Half, Rel_desc *);
void	Dbg32_reloc_doact(Lm_list *, int, Elf32_Half, Elf32_Word, Rel_desc *,
	    Elf32_Word, Elf32_Word, rel_desc_sname_func_t);
void	Dbg64_reloc_doact(Lm_list *, int, Elf64_Half, Elf64_Word, Rel_desc *,
	    Elf64_Xword, Elf64_Xword, rel_desc_sname_func_t);
void	Dbg32_reloc_doact_title(Lm_list *);
void	Dbg64_reloc_doact_title(Lm_list *);
void	Dbg32_reloc_dooutrel(Lm_list *, Elf32_Word);
void	Dbg64_reloc_dooutrel(Lm_list *, Elf64_Word);
void	Dbg32_reloc_entry(Lm_list *, const char *, Elf32_Half, Elf32_Word,
	    void *, const char *, const char *, const char *);
void	Dbg64_reloc_entry(Lm_list *, const char *, Elf64_Half, Elf64_Word,
	    void *, const char *, const char *, const char *);
void	Dbg32_reloc_error(Lm_list *, int, Elf32_Half, Elf32_Word, void *,
	    const char *);
void	Dbg64_reloc_error(Lm_list *, int, Elf64_Half, Elf64_Word, void *,
	    const char *);
void	Dbg32_reloc_generate(Lm_list *, Os_desc *, Elf32_Word);
void	Dbg64_reloc_generate(Lm_list *, Os_desc *, Elf64_Word);
void	Dbg32_reloc_in(Lm_list *, int, Elf32_Half, Elf32_Word, void *,
	    const char *, Elf32_Word, const char *);
void	Dbg64_reloc_in(Lm_list *, int, Elf64_Half, Elf64_Word, void *,
	    const char *, Elf64_Word, const char *);
void	Dbg32_reloc_ors_entry(Lm_list *, int, Elf32_Word, Elf32_Half, Rel_desc *);
void	Dbg64_reloc_ors_entry(Lm_list *, int, Elf64_Word, Elf64_Half, Rel_desc *);
void	Dbg32_reloc_out(Ofl_desc *, int, Elf32_Word, void *, const char *,
	    const char *);
void	Dbg64_reloc_out(Ofl_desc *, int, Elf64_Word, void *, const char *,
	    const char *);
void	Dbg32_reloc_proc(Lm_list *, Os_desc *, Is_desc *, Is_desc *);
void	Dbg64_reloc_proc(Lm_list *, Os_desc *, Is_desc *, Is_desc *);
void	Dbg32_reloc_run(Rt_map *, uint_t, int, int);
void	Dbg64_reloc_run(Rt_map *, uint_t, int, int);
void	Dbg32_reloc_transition(Lm_list *, Elf32_Half, Elf32_Word, Rel_desc *,
	    rel_desc_sname_func_t);
void	Dbg64_reloc_transition(Lm_list *, Elf64_Half, Elf64_Word, Rel_desc *,
	    rel_desc_sname_func_t);

void	Dbg32_sec_added(Lm_list *, Os_desc *, Sg_desc *);
void	Dbg64_sec_added(Lm_list *, Os_desc *, Sg_desc *);
void	Dbg32_sec_backing(Lm_list *);
void	Dbg64_sec_backing(Lm_list *);
void	Dbg32_sec_created(Lm_list *, Os_desc *, Sg_desc *);
void	Dbg64_sec_created(Lm_list *, Os_desc *, Sg_desc *);
void	Dbg32_sec_discarded(Lm_list *, Is_desc *, Is_desc *);
void	Dbg64_sec_discarded(Lm_list *, Is_desc *, Is_desc *);
void	Dbg32_sec_group(Lm_list *, Is_desc *, Group_desc *);
void	Dbg64_sec_group(Lm_list *, Is_desc *, Group_desc *);
void	Dbg32_sec_gnu_comdat(Lm_list *, Is_desc *, Boolean, Boolean);
void	Dbg64_sec_gnu_comdat(Lm_list *, Is_desc *, Boolean, Boolean);
void	Dbg32_sec_in(Lm_list *, Is_desc *);
void	Dbg64_sec_in(Lm_list *, Is_desc *);
void	Dbg32_sec_order_error(Lm_list *, Ifl_desc *, Elf32_Word, int);
void	Dbg64_sec_order_error(Lm_list *, Ifl_desc *, Elf64_Word, int);
void	Dbg32_sec_order_list(Ofl_desc *, int);
void	Dbg64_sec_order_list(Ofl_desc *, int);
void	Dbg32_sec_redirected(Lm_list *, Is_desc *, const char *);
void	Dbg64_sec_redirected(Lm_list *, Is_desc *, const char *);
void	Dbg32_sec_strtab(Lm_list *, Os_desc *, Str_tbl *);
void	Dbg64_sec_strtab(Lm_list *, Os_desc *, Str_tbl *);

void	Dbg32_seg_desc_entry(Lm_list *, uchar_t, Elf32_Half, int, Sg_desc *,
	    Boolean);
void	Dbg64_seg_desc_entry(Lm_list *, uchar_t, Elf64_Half, int, Sg_desc *,
	    Boolean);
void	Dbg32_seg_entry(Ofl_desc *, int, Sg_desc *);
void	Dbg64_seg_entry(Ofl_desc *, int, Sg_desc *);
void	Dbg32_seg_list(Lm_list *, uchar_t, Elf32_Half, APlist *);
void	Dbg64_seg_list(Lm_list *, uchar_t, Elf64_Half, APlist *);
void	Dbg32_seg_os(Ofl_desc *, Os_desc *, int);
void	Dbg64_seg_os(Ofl_desc *, Os_desc *, int);
void    Dbg32_seg_title(Lm_list *);
void    Dbg64_seg_title(Lm_list *);

void	Dbg32_shdr_modified(Lm_list *, const char *, uchar_t, Half,
	    Elf32_Word, Shdr *, Shdr *, const char *);
void	Dbg64_shdr_modified(Lm_list *, const char *, uchar_t, Half,
	    Elf64_Word, Shdr *, Shdr *, const char *);

void	Dbg32_statistics_ar(Ofl_desc *);
void	Dbg64_statistics_ar(Ofl_desc *);
void	Dbg32_statistics_ld(Ofl_desc *);
void	Dbg64_statistics_ld(Ofl_desc *);

void	Dbg32_support_action(Lm_list *, const char *, const char *, Support_ndx,
	    const char *);
void	Dbg64_support_action(Lm_list *, const char *, const char *, Support_ndx,
	    const char *);
void	Dbg32_support_load(Lm_list *, const char *, const char *);
void	Dbg64_support_load(Lm_list *, const char *, const char *);
void	Dbg32_support_req(Lm_list *, const char *, int);
void	Dbg64_support_req(Lm_list *, const char *, int);

void	Dbg32_syminfo_entry(Lm_list *, Elf32_Word, Syminfo *, Sym *, const char *,
	    Dyn *);
void	Dbg64_syminfo_entry(Lm_list *, Elf64_Word, Syminfo *, Sym *, const char *,
	    Dyn *);
void	Dbg32_syminfo_title(Lm_list *);
void	Dbg64_syminfo_title(Lm_list *);

void	Dbg32_syms_ar_checking(Lm_list *, const char *, const char *,
	    Elf_Arsym *);
void	Dbg64_syms_ar_checking(Lm_list *, const char *, const char *,
	    Elf_Arsym *);
void	Dbg32_syms_ar_entry(Lm_list *, Xword, Elf_Arsym *);
void	Dbg64_syms_ar_entry(Lm_list *, Xword, Elf_Arsym *);
void	Dbg32_syms_ar_force(Lm_list *, const char *, const char *);
void	Dbg64_syms_ar_force(Lm_list *, const char *, const char *);
void	Dbg32_syms_ar_resolve(Lm_list *, const char *, const char *,
	    Elf_Arsym *);
void	Dbg64_syms_ar_resolve(Lm_list *, const char *, const char *,
	    Elf_Arsym *);
void	Dbg32_syms_ar_skip(Lm_list *, const char *, Elf_Arsym *);
void	Dbg64_syms_ar_skip(Lm_list *, const char *, Elf_Arsym *);
void	Dbg32_syms_ar_title(Lm_list *, const char *, Boolean);
void	Dbg64_syms_ar_title(Lm_list *, const char *, Boolean);
void	Dbg32_syms_cap_convert(Ofl_desc *, Word, const char *, Sym *);
void	Dbg64_syms_cap_convert(Ofl_desc *, Word, const char *, Sym *);
void	Dbg32_syms_cap_local(Ofl_desc *, Word, const char *, Sym *, Sym_desc *);
void	Dbg64_syms_cap_local(Ofl_desc *, Word, const char *, Sym *, Sym_desc *);
void	Dbg32_syms_cap_lookup(Rt_map *, uint_t, const char *, uint_t, Half,
	    Syscapset *);
void	Dbg64_syms_cap_lookup(Rt_map *, uint_t, const char *, uint_t, Half,
	    Syscapset *);
void	Dbg32_syms_cap_title(Ofl_desc *);
void	Dbg64_syms_cap_title(Ofl_desc *);
void	Dbg32_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word);
void	Dbg64_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word);
void	Dbg32_syms_created(Lm_list *, const char *);
void	Dbg64_syms_created(Lm_list *, const char *);
void	Dbg32_syms_discarded(Lm_list *, Sym_desc *);
void	Dbg64_syms_discarded(Lm_list *, Sym_desc *);
void	Dbg32_syms_entered(Ofl_desc *, Sym *, Sym_desc *);
void	Dbg64_syms_entered(Ofl_desc *, Sym *, Sym_desc *);
void	Dbg32_syms_entry(Lm_list *, Elf32_Word, Sym_desc *);
void	Dbg64_syms_entry(Lm_list *, Elf64_Word, Sym_desc *);
void	Dbg32_syms_global(Lm_list *, Elf32_Word, const char *);
void	Dbg64_syms_global(Lm_list *, Elf64_Word, const char *);
void	Dbg32_syms_ignore(Ofl_desc *, Sym_desc *);
void	Dbg64_syms_ignore(Ofl_desc *, Sym_desc *);
void	Dbg32_syms_lazy_rescan(Lm_list *, const char *);
void	Dbg64_syms_lazy_rescan(Lm_list *, const char *);
void	Dbg32_syms_lookup(Rt_map *, const char *, const char *);
void	Dbg64_syms_lookup(Rt_map *, const char *, const char *);
void	Dbg32_syms_lookup_aout(Lm_list *, const char *);
void	Dbg32_syms_new(Ofl_desc *, Sym *, Sym_desc *);
void	Dbg64_syms_new(Ofl_desc *, Sym *, Sym_desc *);
void	Dbg32_syms_old(Ofl_desc *, Sym_desc *);
void	Dbg64_syms_old(Ofl_desc *, Sym_desc *);
void	Dbg32_syms_process(Lm_list *, Ifl_desc *);
void	Dbg64_syms_process(Lm_list *, Ifl_desc *);
void	Dbg32_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *);
void	Dbg64_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *);
void	Dbg32_syms_resolved(Ofl_desc *, Sym_desc *);
void	Dbg64_syms_resolved(Ofl_desc *, Sym_desc *);
void	Dbg32_syms_resolving(Ofl_desc *, Elf32_Word, const char *, int, int,
	    Sym *, Sym *, Sym_desc *, Ifl_desc *);
void	Dbg64_syms_resolving(Ofl_desc *, Elf64_Word, const char *, int, int,
	    Sym *, Sym *, Sym_desc *, Ifl_desc *);
void	Dbg32_syms_sec_entry(Lm_list *, Elf32_Word, Sg_desc *, Os_desc *);
void	Dbg64_syms_sec_entry(Lm_list *, Elf64_Word, Sg_desc *, Os_desc *);
void	Dbg32_syms_sec_title(Lm_list *);
void	Dbg64_syms_sec_title(Lm_list *);
void	Dbg32_syms_spec_title(Lm_list *);
void	Dbg64_syms_spec_title(Lm_list *);
void	Dbg32_syms_updated(Ofl_desc *, Sym_desc *, const char *);
void	Dbg64_syms_updated(Ofl_desc *, Sym_desc *, const char *);
void	Dbg32_syms_up_title(Lm_list *);
void	Dbg64_syms_up_title(Lm_list *);
void	Dbg32_syms_wrap(Lm_list *, Elf32_Word, const char *, const char *);
void	Dbg64_syms_wrap(Lm_list *, Elf64_Word, const char *, const char *);

void	Dbg32_util_broadcast(Rt_map *);
void	Dbg64_util_broadcast(Rt_map *);
void	Dbg32_util_call_array(Rt_map *, void *, int, Elf32_Word);
void	Dbg64_util_call_array(Rt_map *, void *, int, Elf64_Word);
void	Dbg32_util_call_fini(Rt_map *);
void	Dbg64_util_call_fini(Rt_map *);
void	Dbg32_util_call_init(Rt_map *, int);
void	Dbg64_util_call_init(Rt_map *, int);
void	Dbg32_util_call_main(Rt_map *);
void	Dbg64_util_call_main(Rt_map *);
void	Dbg32_util_collect(Rt_map *, int, int);
void	Dbg64_util_collect(Rt_map *, int, int);
void	Dbg32_util_dbnotify(Lm_list *, rd_event_e, r_state_e);
void	Dbg64_util_dbnotify(Lm_list *, rd_event_e, r_state_e);
void	Dbg32_util_edge_in(Lm_list *, Rt_map *, uint_t, Rt_map *, int, int);
void	Dbg64_util_edge_in(Lm_list *, Rt_map *, uint_t, Rt_map *, int, int);
void	Dbg32_util_edge_out(Rt_map *, Rt_map *);
void	Dbg64_util_edge_out(Rt_map *, Rt_map *);
void	Dbg32_util_intoolate(Rt_map *);
void	Dbg64_util_intoolate(Rt_map *);
void    Dbg32_util_lcinterface(Rt_map *, int, char *);
void    Dbg64_util_lcinterface(Rt_map *, int, char *);
void	Dbg32_util_nl(Lm_list *, int);
void	Dbg64_util_nl(Lm_list *, int);
void	Dbg32_util_scc_entry(Rt_map *, uint_t);
void	Dbg64_util_scc_entry(Rt_map *, uint_t);
void	Dbg32_util_scc_title(Lm_list *, int);
void	Dbg64_util_scc_title(Lm_list *, int);
void	Dbg32_util_str(Lm_list *, const char  *);
void	Dbg64_util_str(Lm_list *, const char  *);
void	Dbg32_util_wait(Rt_map *, Rt_map *, int);
void	Dbg64_util_wait(Rt_map *, Rt_map *, int);

void	Dbg32_unused_file(Lm_list *, const char *, int, uint_t);
void	Dbg64_unused_file(Lm_list *, const char *, int, uint_t);
void    Dbg32_unused_lcinterface(Rt_map *, Rt_map *, int);
void    Dbg64_unused_lcinterface(Rt_map *, Rt_map *, int);
void	Dbg32_unused_path(Lm_list *, const char *, uint_t, uint_t,
	    const char *);
void	Dbg64_unused_path(Lm_list *, const char *, uint_t, uint_t,
	    const char *);
void	Dbg32_unused_sec(Lm_list *, Is_desc *);
void	Dbg64_unused_sec(Lm_list *, Is_desc *);
void	Dbg32_unused_unref(Rt_map *, const char *);
void	Dbg64_unused_unref(Rt_map *, const char *);

void	Dbg32_ver_need_done(Lm_list *);
void	Dbg64_ver_need_done(Lm_list *);
void	Dbg32_ver_need_entry(Lm_list *, Half, const char *, const char *);
void	Dbg64_ver_need_entry(Lm_list *, Half, const char *, const char *);
void	Dbg32_ver_need_title(Lm_list *, const char *);
void	Dbg64_ver_need_title(Lm_list *, const char *);

const char *Elf_demangle_name(const char *);

void Elf_syminfo_entry(Lm_list *, Word, Syminfo *, const char *, const char *);
void Elf_syminfo_title(Lm_list *);
void Elf_ver_def_title(Lm_list *);
void Elf_ver_need_title(Lm_list *, int);
void Elf_ver_line_1(Lm_list *, const char *, const char *, const char *,
    const char *);
void Elf_ver_line_2(Lm_list *, const char *, const char *);
void Elf_ver_line_3(Lm_list *, const char *, const char *, const char *);
void Elf_ver_line_4(Lm_list *, const char *);
void Elf_ver_line_5(Lm_list *, const char *, const char *);

void Elf64_cap_entry(Lm_list *, Elf64_Cap *, int ndx, const char *, size_t,
    Elf64_Half);
void Elf32_cap_entry(Lm_list *, Elf32_Cap *, int ndx, const char *, size_t,
    Elf32_Half);
void Elf64_cap_title(Lm_list *);
void Elf32_cap_title(Lm_list *);

void Elf64_dyn_entry(Lm_list *, Elf64_Dyn *, int, const char *, uchar_t,
    Elf64_Half);
void Elf32_dyn_entry(Lm_list *, Elf32_Dyn *, int, const char *, uchar_t,
    Elf32_Half);
void Elf64_dyn_null_entry(Lm_list *, Elf64_Dyn *, int, int);
void Elf32_dyn_null_entry(Lm_list *, Elf32_Dyn *, int, int);
void Elf64_dyn_title(Lm_list *);
void Elf32_dyn_title(Lm_list *);

void Elf64_ehdr(Lm_list *, Elf64_Ehdr *, Elf64_Shdr *);
void Elf32_ehdr(Lm_list *, Elf32_Ehdr *, Elf32_Shdr *);

void Elf64_got_entry(Lm_list *, Elf64_Sword, Elf64_Addr, Elf64_Xword,
    Elf64_Half, uchar_t, uchar_t, Elf64_Word, void *, const char *);
void Elf32_got_entry(Lm_list *, Elf32_Sword, Elf32_Addr, Elf32_Word,
    Elf32_Half, uchar_t, uchar_t, Elf32_Word, void *, const char *);
void Elf64_got_title(Lm_list *);
void Elf32_got_title(Lm_list *);

void Elf64_phdr(Lm_list *, uchar_t, Elf64_Half, Elf64_Phdr *);
void Elf32_phdr(Lm_list *, uchar_t, Elf32_Half, Elf32_Phdr *);

void Elf64_reloc_apply_reg(Lm_list *, int, Elf64_Half, Elf64_Xword,
    Elf64_Xword);
void Elf32_reloc_apply_reg(Lm_list *, int, Elf32_Half, Elf32_Word,
    Elf32_Word);
void Elf64_reloc_apply_val(Lm_list *, int, Elf64_Xword, Elf64_Xword);
void Elf32_reloc_apply_val(Lm_list *, int, Elf32_Word, Elf32_Word);
void Elf64_reloc_entry_1(Lm_list *, int, const char *, Elf64_Half, Word, void *,
    const char *, const char *, const char *);
void Elf32_reloc_entry_1(Lm_list *, int, const char *, Elf32_Half, Word, void *,
    const char *, const char *, const char *);
void Elf64_reloc_entry_2(Lm_list *, int, const char *, Word, const char *,
    Elf64_Addr, Elf64_Sxword, const char *, const char *, const char *);
void Elf32_reloc_entry_2(Lm_list *, int, const char *, Word, const char *,
    Elf32_Addr, Elf32_Sword, const char *, const char *, const char *);
void Elf64_reloc_title(Lm_list *, int, Word);
void Elf32_reloc_title(Lm_list *, int, Word);

void Elf64_shdr(Lm_list *, uchar_t, Elf64_Half, Elf64_Shdr *);
void Elf32_shdr(Lm_list *, uchar_t, Elf32_Half, Elf32_Shdr *);

void Elf64_syms_table_entry(Lm_list *, int, const char *, uchar_t, Elf64_Half,
    Elf64_Sym *, Elf64_Versym, int, const char *, const char *);
void Elf32_syms_table_entry(Lm_list *, int, const char *, uchar_t, Elf32_Half,
    Elf32_Sym *, Elf32_Versym, int, const char *, const char *);
void Elf64_syms_table_title(Lm_list *, int);
void Elf32_syms_table_title(Lm_list *, int);