xref: /titanic_50/usr/src/cmd/sgs/include/conv.h (revision b9175c69691c8949bec97fb8f689b7d1efdb05bb)
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 
22 /*
23  *	Copyright (c) 1988 AT&T
24  *	  All Rights Reserved
25  *
26  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
27  * Use is subject to license terms.
28  */
29 
30 #ifndef	_CONV_H
31 #define	_CONV_H
32 
33 /*
34  * Global include file for conversion library.
35  */
36 
37 #include <stdlib.h>
38 #include <libelf.h>
39 #include <dlfcn.h>
40 #include <libld.h>
41 #include <sgs.h>
42 
43 #ifdef	__cplusplus
44 extern "C" {
45 #endif
46 
47 /*
48  * Configuration features available - maintained here (instead of debug.h)
49  * to save libconv from having to include debug.h which results in numerous
50  * "declared but not used or defined" lint errors.
51  */
52 #define	CONF_EDLIBPATH	0x000100	/* ELF default library path */
53 #define	CONF_ESLIBPATH	0x000200	/* ELF secure library path */
54 #define	CONF_ADLIBPATH	0x000400	/* AOUT default library path */
55 #define	CONF_ASLIBPATH	0x000800	/* AOUT secure library path */
56 #define	CONF_DIRCFG	0x001000	/* directory configuration available */
57 #define	CONF_OBJALT	0x002000	/* object alternatives available */
58 #define	CONF_MEMRESV	0x004000	/* memory reservation required */
59 #define	CONF_ENVS	0x008000	/* environment variables available */
60 #define	CONF_FLTR	0x010000	/* filter information available */
61 #define	CONF_FEATMSK	0xffff00
62 
63 /*
64  * Buffer types:
65  *
66  * Many of the routines in this module require the user to supply a
67  * buffer into which the desired strings may be written. These are
68  * all arrays of characters, and might be defined as simple arrays
69  * of char. The problem with that approach is that when such an array
70  * is passed to a function, the C language considers it to have the
71  * type (char *), without any regard to its length. Not all of our
72  * buffers have the same length, and we want to ensure that the compiler
73  * will refuse to compile code that passes the wrong type of buffer to
74  * a given routine. The solution is to define the buffers as unions
75  * that contain the needed array, and then to pass the given union
76  * by address. The compiler will catch attempts to pass the wrong type
77  * of pointer, and the size of a structure/union is implicit in its type.
78  *
79  * A nice side effect of this approach is that we can use a union with
80  * multiple buffers to handle the cases where a given routine needs
81  * more than one type of buffer. The end result is a single buffer large
82  * enough to handle any of the subcases, but no larger.
83  */
84 
85 /*
86  * Size of buffer used by conv_invalid_val():
87  *
88  * Various values that can't be matched to a symbolic definition are converted
89  * to a numeric string.
90  *
91  * The buffer size reflects the maximum number of digits needed to
92  * display an integer as text, plus a trailing null, and with room for
93  * a leading "0x" if hexidecimal display is selected.
94  */
95 #define	CONV32_INV_BUFSIZE	12
96 typedef union {
97 	char			buf[CONV32_INV_BUFSIZE];
98 } Conv32_inv_buf_t;
99 
100 #define	CONV64_INV_BUFSIZE	22
101 typedef union {
102 	char			buf[CONV64_INV_BUFSIZE];
103 } Conv64_inv_buf_t;
104 
105 
106 
107 /* conv_ehdr_flags() */
108 #define	CONV_EHDR_FLAGS_BASE_BUFSIZE	69
109 #define	CONV32_EHDR_FLAGS_BUFSIZE	\
110 	(CONV_EHDR_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
111 typedef union {
112 	Conv32_inv_buf_t	inv_buf;
113 	char			buf[CONV32_EHDR_FLAGS_BUFSIZE];
114 } Conv32_ehdr_flags_buf_t;
115 
116 #define	CONV64_EHDR_FLAGS_BUFSIZE	\
117 	(CONV_EHDR_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
118 typedef union {
119 	Conv64_inv_buf_t	inv_buf;
120 	char			buf[CONV64_EHDR_FLAGS_BUFSIZE];
121 } Conv64_ehdr_flags_buf_t;
122 
123 
124 /* conv_reject_desc() */
125 typedef union {
126 	Conv32_inv_buf_t	inv_buf;
127 	Conv32_ehdr_flags_buf_t	flags_buf;
128 } Conv32_reject_desc_buf_t;
129 
130 typedef union {
131 	Conv64_inv_buf_t	inv_buf;
132 	Conv64_ehdr_flags_buf_t	flags_buf;
133 } Conv64_reject_desc_buf_t;
134 
135 
136 /*
137  * conv_cap_val_hw1()
138  *
139  * This size is based on the maximum number of hardware capabilities
140  * that exist.  See common/elfcap.
141  */
142 #define	CONV_CAP_VAL_HW1_BUFSIZE	195
143 
144 typedef union {
145 	Conv32_inv_buf_t	inv_buf;
146 	char			buf[CONV_CAP_VAL_HW1_BUFSIZE];
147 } Conv32_cap_val_hw1_buf_t;
148 
149 typedef union {
150 	Conv64_inv_buf_t	inv_buf;
151 	char			buf[CONV_CAP_VAL_HW1_BUFSIZE];
152 } Conv64_cap_val_hw1_buf_t;
153 
154 
155 /*
156  * conv_cap_val_sf1()
157  *
158  * This size is based on the maximum number of software capabilities
159  * that exist.  See common/elfcap.
160  */
161 #define	CONV_CAP_VAL_SF1_BUFSIZE	45
162 
163 typedef union {
164 	Conv32_inv_buf_t	inv_buf;
165 	char			buf[CONV_CAP_VAL_SF1_BUFSIZE];
166 } Conv32_cap_val_sf1_buf_t;
167 
168 typedef union {
169 	Conv64_inv_buf_t	inv_buf;
170 	char			buf[CONV_CAP_VAL_SF1_BUFSIZE];
171 } Conv64_cap_val_sf1_buf_t;
172 
173 
174 
175 /* conv_cap_val_buf() */
176 typedef union {
177 	Conv32_inv_buf_t		inv_buf;
178 	Conv32_cap_val_hw1_buf_t	cap_val_hw1_buf;
179 	Conv32_cap_val_sf1_buf_t	cap_val_sf1_buf;
180 } Conv32_cap_val_buf_t;
181 
182 typedef union {
183 	Conv64_inv_buf_t		inv_buf;
184 	Conv64_cap_val_hw1_buf_t	cap_val_hw1_buf;
185 	Conv64_cap_val_sf1_buf_t	cap_val_sf1_buf;
186 } Conv64_cap_val_buf_t;
187 
188 
189 /* conv_config_feat() */
190 #define	CONV_CONFIG_FEAT_BUFSIZE	194
191 
192 typedef union {
193 	Conv32_inv_buf_t	inv_buf;
194 	char			buf[CONV_CONFIG_FEAT_BUFSIZE];
195 } Conv32_config_feat_buf_t;
196 
197 typedef union {
198 	Conv64_inv_buf_t	inv_buf;
199 	char			buf[CONV_CONFIG_FEAT_BUFSIZE];
200 } Conv64_config_feat_buf_t;
201 
202 
203 /* conv_config_obj() */
204 #define	CONV_CONFIG_OBJ_BUFSIZE		154
205 
206 typedef union {
207 	Conv32_inv_buf_t	inv_buf;
208 	char			buf[CONV_CONFIG_OBJ_BUFSIZE];
209 } Conv32_config_obj_buf_t;
210 
211 typedef union {
212 	Conv64_inv_buf_t	inv_buf;
213 	char			buf[CONV_CONFIG_OBJ_BUFSIZE];
214 } Conv64_config_obj_buf_t;
215 
216 
217 /* conv_dl_mode() */
218 #define	CONV_DL_MODE_BUFSIZE		122
219 
220 typedef union {
221 	Conv32_inv_buf_t	inv_buf;
222 	char			buf[CONV_DL_MODE_BUFSIZE];
223 } Conv32_dl_mode_buf_t;
224 
225 typedef union {
226 	Conv64_inv_buf_t	inv_buf;
227 	char			buf[CONV_DL_MODE_BUFSIZE];
228 } Conv64_dl_mode_buf_t;
229 
230 
231 /* conv_dl_flag() */
232 #define	CONV_DL_FLAG_BUFSIZE		175
233 
234 typedef union {
235 	Conv32_inv_buf_t	inv_buf;
236 	char			buf[CONV_DL_FLAG_BUFSIZE];
237 } Conv32_dl_flag_buf_t;
238 
239 typedef union {
240 	Conv64_inv_buf_t	inv_buf;
241 	char			buf[CONV_DL_FLAG_BUFSIZE];
242 } Conv64_dl_flag_buf_t;
243 
244 
245 /* conv_grphdl_flags() */
246 #define	CONV_GRPHDL_FLAGS_BUFSIZE	82
247 
248 typedef union {
249 	Conv32_inv_buf_t	inv_buf;
250 	char			buf[CONV_GRPHDL_FLAGS_BUFSIZE];
251 } Conv32_grphdl_flags_buf_t;
252 
253 typedef union {
254 	Conv64_inv_buf_t	inv_buf;
255 	char			buf[CONV_GRPHDL_FLAGS_BUFSIZE];
256 } Conv64_grphdl_flags_buf_t;
257 
258 
259 /* conv_grpdesc_flags() */
260 #define	CONV_GRPDESC_FLAGS_BUFSIZE	92
261 
262 typedef union {
263 	Conv32_inv_buf_t	inv_buf;
264 	char			buf[CONV_GRPDESC_FLAGS_BUFSIZE];
265 } Conv32_grpdesc_flags_buf_t;
266 
267 typedef union {
268 	Conv64_inv_buf_t	inv_buf;
269 	char			buf[CONV_GRPDESC_FLAGS_BUFSIZE];
270 } Conv64_grpdesc_flags_buf_t;
271 
272 
273 /* conv_seg_flags() */
274 #define	CONV_SEG_FLAGS_BUFSIZE		186
275 
276 typedef union {
277 	Conv32_inv_buf_t	inv_buf;
278 	char			buf[CONV_SEG_FLAGS_BUFSIZE];
279 } Conv32_seg_flags_buf_t;
280 
281 typedef union {
282 	Conv64_inv_buf_t	inv_buf;
283 	char			buf[CONV_SEG_FLAGS_BUFSIZE];
284 } Conv64_seg_flags_buf_t;
285 
286 
287 /* conv_dyn_posflag1() */
288 #define	CONV_DYN_POSFLAG1_BASE_BUFSIZE	23
289 #define	CONV32_DYN_POSFLAG1_BUFSIZE	\
290 	(CONV_DYN_POSFLAG1_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
291 typedef union {
292 	Conv32_inv_buf_t	inv_buf;
293 	char			buf[CONV32_DYN_POSFLAG1_BUFSIZE];
294 } Conv32_dyn_posflag1_buf_t;
295 
296 #define	CONV64_DYN_POSFLAG1_BUFSIZE	\
297 	(CONV_DYN_POSFLAG1_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
298 typedef union {
299 	Conv64_inv_buf_t	inv_buf;
300 	char			buf[CONV64_DYN_POSFLAG1_BUFSIZE];
301 } Conv64_dyn_posflag1_buf_t;
302 
303 
304 /* conv_dyn_flag() */
305 #define	CONV_DYN_FLAG_BASE_BUFSIZE	48
306 #define	CONV32_DYN_FLAG_BUFSIZE	\
307 	(CONV_DYN_FLAG_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
308 typedef union {
309 	Conv32_inv_buf_t	inv_buf;
310 	char			buf[CONV32_DYN_FLAG_BUFSIZE];
311 } Conv32_dyn_flag_buf_t;
312 
313 #define	CONV64_DYN_FLAG_BUFSIZE	\
314 	(CONV_DYN_FLAG_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
315 typedef union {
316 	Conv64_inv_buf_t	inv_buf;
317 	char			buf[CONV64_DYN_FLAG_BUFSIZE];
318 } Conv64_dyn_flag_buf_t;
319 
320 
321 /* conv_dyn_flag1() */
322 #define	CONV_DYN_FLAG1_BASE_BUFSIZE	265
323 #define	CONV32_DYN_FLAG1_BUFSIZE	\
324 	(CONV_DYN_FLAG1_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
325 typedef union {
326 	Conv32_inv_buf_t	inv_buf;
327 	char			buf[CONV32_DYN_FLAG1_BUFSIZE];
328 } Conv32_dyn_flag1_buf_t;
329 
330 #define	CONV64_DYN_FLAG1_BUFSIZE	\
331 	(CONV_DYN_FLAG1_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
332 typedef union {
333 	Conv64_inv_buf_t	inv_buf;
334 	char			buf[CONV64_DYN_FLAG1_BUFSIZE];
335 } Conv64_dyn_flag1_buf_t;
336 
337 
338 /* conv_dyn_feature1() */
339 #define	CONV_DYN_FEATURE1_BASE_BUFSIZE	20
340 #define	CONV32_DYN_FEATURE1_BUFSIZE	\
341 	(CONV_DYN_FEATURE1_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
342 typedef union {
343 	Conv32_inv_buf_t	inv_buf;
344 	char			buf[CONV32_DYN_FEATURE1_BUFSIZE];
345 } Conv32_dyn_feature1_buf_t;
346 
347 #define	CONV64_DYN_FEATURE1_BUFSIZE	\
348 	(CONV_DYN_FEATURE1_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
349 typedef union {
350 	Conv64_inv_buf_t	inv_buf;
351 	char			buf[CONV64_DYN_FEATURE1_BUFSIZE];
352 } Conv64_dyn_feature1_buf_t;
353 
354 
355 /* conv_bnd_type() */
356 #define	CONV_BND_TYPE_BASE_BUFSIZE	29
357 #define	CONV32_BND_TYPE_BUFSIZE	\
358 	(CONV_BND_TYPE_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
359 typedef union {
360 	Conv32_inv_buf_t	inv_buf;
361 	char			buf[CONV32_BND_TYPE_BUFSIZE];
362 } Conv32_bnd_type_buf_t;
363 
364 #define	CONV64_BND_TYPE_BUFSIZE	\
365 	(CONV_BND_TYPE_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
366 typedef union {
367 	Conv64_inv_buf_t	inv_buf;
368 	char			buf[CONV64_BND_TYPE_BUFSIZE];
369 } Conv64_bnd_type_buf_t;
370 
371 
372 /* conv_bnd_obj() */
373 #define	CONV_BND_OBJ_BASE_BUFSIZE	38
374 #define	CONV32_BND_OBJ_BUFSIZE	\
375 	(CONV_BND_OBJ_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
376 typedef union {
377 	Conv32_inv_buf_t	inv_buf;
378 	char			buf[CONV32_BND_OBJ_BUFSIZE];
379 } Conv32_bnd_obj_buf_t;
380 
381 #define	CONV64_BND_OBJ_BUFSIZE	\
382 	(CONV_BND_OBJ_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
383 typedef union {
384 	Conv64_inv_buf_t	inv_buf;
385 	char			buf[CONV64_BND_OBJ_BUFSIZE];
386 } Conv64_bnd_obj_buf_t;
387 
388 
389 /* conv_phdr_flags() */
390 #define	CONV_PHDR_FLAGS_BASE_BUFSIZE	35
391 #define	CONV32_PHDR_FLAGS_BUFSIZE	\
392 	(CONV_PHDR_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
393 typedef union {
394 	Conv32_inv_buf_t	inv_buf;
395 	char			buf[CONV32_PHDR_FLAGS_BUFSIZE];
396 } Conv32_phdr_flags_buf_t;
397 
398 #define	CONV64_PHDR_FLAGS_BUFSIZE	\
399 	(CONV_PHDR_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
400 typedef union {
401 	Conv64_inv_buf_t	inv_buf;
402 	char			buf[CONV64_PHDR_FLAGS_BUFSIZE];
403 } Conv64_phdr_flags_buf_t;
404 
405 
406 /* conv_sec_flags() */
407 #define	CONV_SEC_FLAGS_BASE_BUFSIZE	168
408 #define	CONV32_SEC_FLAGS_BUFSIZE	\
409 	(CONV_SEC_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
410 typedef union {
411 	Conv32_inv_buf_t	inv_buf;
412 	char			buf[CONV32_SEC_FLAGS_BUFSIZE];
413 } Conv32_sec_flags_buf_t;
414 
415 #define	CONV64_SEC_FLAGS_BUFSIZE	\
416 	(CONV_SEC_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
417 typedef union {
418 	Conv64_inv_buf_t	inv_buf;
419 	char			buf[CONV64_SEC_FLAGS_BUFSIZE];
420 } Conv64_sec_flags_buf_t;
421 
422 
423 /* conv_dwarf_ehe() */
424 #define	CONV_DWARF_EHE_BUFSIZE		33
425 typedef union {
426 	Conv32_inv_buf_t	inv_buf;
427 	char			buf[CONV_DWARF_EHE_BUFSIZE];
428 } Conv32_dwarf_ehe_buf_t;
429 typedef union {
430 	Conv64_inv_buf_t	inv_buf;
431 	char			buf[CONV_DWARF_EHE_BUFSIZE];
432 } Conv64_dwarf_ehe_buf_t;
433 
434 
435 /* conv_syminfo_flags() */
436 #define	CONV_SYMINFO_FLAGS_BASE_BUFSIZE	36
437 #define	CONV32_SYMINFO_FLAGS_BUFSIZE	\
438 	(CONV_SYMINFO_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE)
439 typedef union {
440 	Conv32_inv_buf_t	inv_buf;
441 	char			buf[CONV32_SYMINFO_FLAGS_BUFSIZE];
442 } Conv32_syminfo_flags_buf_t;
443 
444 #define	CONV64_SYMINFO_FLAGS_BUFSIZE	\
445 	(CONV_SYMINFO_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE)
446 typedef union {
447 	Conv64_inv_buf_t	inv_buf;
448 	char			buf[CONV64_SYMINFO_FLAGS_BUFSIZE];
449 } Conv64_syminfo_flags_buf_t;
450 
451 
452 /* conv_cnote_pr_flags() */
453 #define	CONV_CNOTE_PR_FLAGS_BUFSIZE	244
454 typedef union {
455 	Conv32_inv_buf_t	inv_buf;
456 	char			buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
457 } Conv32_cnote_pr_flags_buf_t;
458 typedef union {
459 	Conv64_inv_buf_t	inv_buf;
460 	char			buf[CONV_CNOTE_PR_FLAGS_BUFSIZE];
461 } Conv64_cnote_pr_flags_buf_t;
462 
463 
464 /* conv_cnote_old_pr_flags() */
465 #define	CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE	164
466 typedef union {
467 	Conv32_inv_buf_t	inv_buf;
468 	char			buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
469 } Conv32_cnote_old_pr_flags_buf_t;
470 typedef union {
471 	Conv64_inv_buf_t	inv_buf;
472 	char			buf[CONV_CNOTE_OLD_PR_FLAGS_BUFSIZE];
473 } Conv64_cnote_old_pr_flags_buf_t;
474 
475 
476 /* conv_cnote_proc_flag() */
477 #define	CONV_CNOTE_PROC_FLAG_BUFSIZE	29
478 typedef union {
479 	Conv32_inv_buf_t	inv_buf;
480 	char			buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
481 } Conv32_cnote_proc_flag_buf_t;
482 typedef union {
483 	Conv64_inv_buf_t	inv_buf;
484 	char			buf[CONV_CNOTE_PROC_FLAG_BUFSIZE];
485 } Conv64_cnote_proc_flag_buf_t;
486 
487 
488 /* conv_cnote_sigset() */
489 #define	CONV_CNOTE_SIGSET_BUFSIZE	629
490 typedef union {
491 	Conv32_inv_buf_t	inv_buf;
492 	char			buf[CONV_CNOTE_SIGSET_BUFSIZE];
493 } Conv32_cnote_sigset_buf_t;
494 typedef union {
495 	Conv64_inv_buf_t	inv_buf;
496 	char			buf[CONV_CNOTE_SIGSET_BUFSIZE];
497 } Conv64_cnote_sigset_buf_t;
498 
499 
500 /* conv_cnote_fltset() */
501 #define	CONV_CNOTE_FLTSET_BUFSIZE	501
502 typedef union {
503 	Conv32_inv_buf_t	inv_buf;
504 	char			buf[CONV_CNOTE_FLTSET_BUFSIZE];
505 } Conv32_cnote_fltset_buf_t;
506 typedef union {
507 	Conv64_inv_buf_t	inv_buf;
508 	char			buf[CONV_CNOTE_FLTSET_BUFSIZE];
509 } Conv64_cnote_fltset_buf_t;
510 
511 
512 /* conv_cnote_sysset() */
513 #define	CONV_CNOTE_SYSSET_BUFSIZE	3212
514 typedef union {
515 	Conv32_inv_buf_t	inv_buf;
516 	char			buf[CONV_CNOTE_SYSSET_BUFSIZE];
517 } Conv32_cnote_sysset_buf_t;
518 typedef union {
519 	Conv64_inv_buf_t	inv_buf;
520 	char			buf[CONV_CNOTE_SYSSET_BUFSIZE];
521 } Conv64_cnote_sysset_buf_t;
522 
523 
524 /* conv_cnote_sa_flags() */
525 #define	CONV_CNOTE_SA_FLAGS_BUFSIZE	99
526 typedef union {
527 	Conv32_inv_buf_t	inv_buf;
528 	char			buf[CONV_CNOTE_SA_FLAGS_BUFSIZE];
529 } Conv32_cnote_sa_flags_buf_t;
530 typedef union {
531 	Conv64_inv_buf_t	inv_buf;
532 	char			buf[CONV_CNOTE_SA_FLAGS_BUFSIZE];
533 } Conv64_cnote_sa_flags_buf_t;
534 
535 
536 /* conv_cnote_ss_flags() */
537 #define	CONV_CNOTE_SS_FLAGS_BUFSIZE	38
538 typedef union {
539 	Conv32_inv_buf_t	inv_buf;
540 	char			buf[CONV_CNOTE_SS_FLAGS_BUFSIZE];
541 } Conv32_cnote_ss_flags_buf_t;
542 typedef union {
543 	Conv64_inv_buf_t	inv_buf;
544 	char			buf[CONV_CNOTE_SS_FLAGS_BUFSIZE];
545 } Conv64_cnote_ss_flags_buf_t;
546 
547 
548 /* conv_cnote_cc_content() */
549 #define	CONV_CNOTE_CC_CONTENT_BUFSIZE	87
550 typedef union {
551 	Conv32_inv_buf_t	inv_buf;
552 	char			buf[CONV_CNOTE_CC_CONTENT_BUFSIZE];
553 } Conv32_cnote_cc_content_buf_t;
554 typedef union {
555 	Conv64_inv_buf_t	inv_buf;
556 	char			buf[CONV_CNOTE_CC_CONTENT_BUFSIZE];
557 } Conv64_cnote_cc_content_buf_t;
558 
559 
560 /* conv_cnote_auxv_af() */
561 #define	CONV_CNOTE_AUXV_AF_BUFSIZE	63
562 typedef union {
563 	Conv32_inv_buf_t	inv_buf;
564 	char			buf[CONV_CNOTE_AUXV_AF_BUFSIZE];
565 } Conv32_cnote_auxv_af_buf_t;
566 typedef union {
567 	Conv64_inv_buf_t	inv_buf;
568 	char			buf[CONV_CNOTE_AUXV_AF_BUFSIZE];
569 } Conv64_cnote_auxv_af_buf_t;
570 
571 
572 /* conv_ver_flags() */
573 #define	CONV_VER_FLAGS_BUFSIZE	31
574 typedef union {
575 	Conv32_inv_buf_t	inv_buf;
576 	char			buf[CONV_VER_FLAGS_BUFSIZE];
577 } Conv32_ver_flags_buf_t;
578 typedef union {
579 	Conv64_inv_buf_t	inv_buf;
580 	char			buf[CONV_VER_FLAGS_BUFSIZE];
581 } Conv64_ver_flags_buf_t;
582 
583 
584 
585 /*
586  * Generic names for class specific buffer types above
587  */
588 #if	defined(_ELF64)
589 #define	CONV_INV_BUFSIZE		CONV64_INV_BUFSIZE
590 #define	CONV_EHDR_FLAGS_BUFSIZE		CONV64_EHDR_FLAGS_BUFSIZE
591 #define	CONV_DYN_POSFLAG1_BUFSIZE	CONV64_DYN_POSFLAG1_BUFSIZE
592 #define	CONV_DYN_FLAG_BUFSIZE		CONV64_DYN_FLAG_BUFSIZE
593 #define	CONV_DYN_FLAG1_BUFSIZE		CONV64_DYN_FLAG1_BUFSIZE
594 #define	CONV_DYN_FEATURE1_BUFSIZE	CONV64_DYN_FEATURE1_BUFSIZE
595 #define	CONV_BND_TYPE_BUFSIZE		CONV64_BND_TYPE_BUFSIZE
596 #define	CONV_BND_OBJ_BUFSIZE		CONV64_BND_OBJ_BUFSIZE
597 #define	CONV_PHDR_FLAGS_BUFSIZE		CONV64_PHDR_FLAGS_BUFSIZE
598 #define	CONV_SEC_FLAGS_BUFSIZE		CONV64_SEC_FLAGS_BUFSIZE
599 #define	CONV_SYMINFO_FLAGS_BUFSIZE	CONV64_SYMINFO_FLAGS_BUFSIZE
600 
601 #define	Conv_inv_buf_t			Conv64_inv_buf_t
602 #define	Conv_ehdr_flags_buf_t		Conv64_ehdr_flags_buf_t
603 #define	Conv_reject_desc_buf_t		Conv64_reject_desc_buf_t
604 #define	Conv_cap_val_hw1_buf_t		Conv64_cap_val_hw1_buf_t
605 #define	Conv_cap_val_sf1_buf_t		Conv64_cap_val_sf1_buf_t
606 #define	Conv_cap_val_buf_t		Conv64_cap_val_buf_t
607 #define	Conv_config_feat_buf_t		Conv64_config_feat_buf_t
608 #define	Conv_config_obj_buf_t		Conv64_config_obj_buf_t
609 #define	Conv_dl_mode_buf_t		Conv64_dl_mode_buf_t
610 #define	Conv_dl_flag_buf_t		Conv64_dl_flag_buf_t
611 #define	Conv_grphdl_flags_buf_t		Conv64_grphdl_flags_buf_t
612 #define	Conv_grpdesc_flags_buf_t	Conv64_grpdesc_flags_buf_t
613 #define	Conv_seg_flags_buf_t		Conv64_seg_flags_buf_t
614 #define	Conv_dyn_posflag1_buf_t		Conv64_dyn_posflag1_buf_t
615 #define	Conv_dyn_flag_buf_t		Conv64_dyn_flag_buf_t
616 #define	Conv_dyn_flag1_buf_t		Conv64_dyn_flag1_buf_t
617 #define	Conv_dyn_feature1_buf_t		Conv64_dyn_feature1_buf_t
618 #define	Conv_bnd_type_buf_t		Conv64_bnd_type_buf_t
619 #define	Conv_bnd_obj_buf_t		Conv64_bnd_obj_buf_t
620 #define	Conv_phdr_flags_buf_t		Conv64_phdr_flags_buf_t
621 #define	Conv_sec_flags_buf_t		Conv64_sec_flags_buf_t
622 #define	Conv_dwarf_ehe_buf_t		Conv64_dwarf_ehe_buf_t
623 #define	Conv_syminfo_flags_buf_t	Conv64_syminfo_flags_buf_t
624 #define	Conv_cnote_pr_flags_buf_t	Conv64_cnote_pr_flags_buf_t
625 #define	Conv_cnote_old_pr_flags_buf_t	Conv64_cnote_old_pr_flags_buf_t
626 #define	Conv_cnote_proc_flag_buf_t	Conv64_cnote_proc_flag_buf_t
627 #define	Conv_cnote_sigset_buf_t		Conv64_cnote_sigset_buf_t
628 #define	Conv_cnote_fltset_buf_t		Conv64_cnote_fltset_buf_t
629 #define	Conv_cnote_sysset_buf_t		Conv64_cnote_sysset_buf_t
630 #define	Conv_cnote_sa_flags_buf_t	Conv64_cnote_sa_flags_buf_t
631 #define	Conv_cnote_ss_flags_buf_t	Conv64_cnote_ss_flags_buf_t
632 #define	Conv_cnote_cc_content_buf_t	Conv64_cnote_cc_content_buf_t
633 #define	Conv_cnote_auxv_af_buf_t	Conv64_cnote_auxv_af_buf_t
634 #define	Conv_ver_flags_buf_t		Conv64_ver_flags_buf_t
635 #else
636 #define	CONV_INV_BUFSIZE		CONV32_INV_BUFSIZE
637 #define	CONV_EHDR_FLAGS_BUFSIZE		CONV32_EHDR_FLAGS_BUFSIZE
638 #define	CONV_DYN_POSFLAG1_BUFSIZE	CONV32_DYN_POSFLAG1_BUFSIZE
639 #define	CONV_DYN_FLAG_BUFSIZE		CONV32_DYN_FLAG_BUFSIZE
640 #define	CONV_DYN_FLAG1_BUFSIZE		CONV32_DYN_FLAG1_BUFSIZE
641 #define	CONV_DYN_FEATURE1_BUFSIZE	CONV32_DYN_FEATURE1_BUFSIZE
642 #define	CONV_BND_TYPE_BUFSIZE		CONV32_BND_TYPE_BUFSIZE
643 #define	CONV_BND_OBJ_BUFSIZE		CONV32_BND_OBJ_BUFSIZE
644 #define	CONV_PHDR_FLAGS_BUFSIZE		CONV32_PHDR_FLAGS_BUFSIZE
645 #define	CONV_SEC_FLAGS_BUFSIZE		CONV32_SEC_FLAGS_BUFSIZE
646 #define	CONV_SYMINFO_FLAGS_BUFSIZE	CONV32_SYMINFO_FLAGS_BUFSIZE
647 
648 #define	Conv_inv_buf_t			Conv32_inv_buf_t
649 #define	Conv_ehdr_flags_buf_t		Conv32_ehdr_flags_buf_t
650 #define	Conv_reject_desc_buf_t		Conv32_reject_desc_buf_t
651 #define	Conv_cap_val_hw1_buf_t		Conv32_cap_val_hw1_buf_t
652 #define	Conv_cap_val_sf1_buf_t		Conv32_cap_val_sf1_buf_t
653 #define	Conv_cap_val_buf_t		Conv32_cap_val_buf_t
654 #define	Conv_config_feat_buf_t		Conv32_config_feat_buf_t
655 #define	Conv_config_obj_buf_t		Conv32_config_obj_buf_t
656 #define	Conv_dl_mode_buf_t		Conv32_dl_mode_buf_t
657 #define	Conv_dl_flag_buf_t		Conv32_dl_flag_buf_t
658 #define	Conv_grphdl_flags_buf_t		Conv32_grphdl_flags_buf_t
659 #define	Conv_grpdesc_flags_buf_t	Conv32_grpdesc_flags_buf_t
660 #define	Conv_seg_flags_buf_t		Conv32_seg_flags_buf_t
661 #define	Conv_dyn_posflag1_buf_t		Conv32_dyn_posflag1_buf_t
662 #define	Conv_dyn_flag_buf_t		Conv32_dyn_flag_buf_t
663 #define	Conv_dyn_flag1_buf_t		Conv32_dyn_flag1_buf_t
664 #define	Conv_dyn_feature1_buf_t		Conv32_dyn_feature1_buf_t
665 #define	Conv_bnd_type_buf_t		Conv32_bnd_type_buf_t
666 #define	Conv_bnd_obj_buf_t		Conv32_bnd_obj_buf_t
667 #define	Conv_phdr_flags_buf_t		Conv32_phdr_flags_buf_t
668 #define	Conv_sec_flags_buf_t		Conv32_sec_flags_buf_t
669 #define	Conv_dwarf_ehe_buf_t		Conv32_dwarf_ehe_buf_t
670 #define	Conv_syminfo_flags_buf_t	Conv32_syminfo_flags_buf_t
671 #define	Conv_cnote_pr_flags_buf_t	Conv32_cnote_pr_flags_buf_t
672 #define	Conv_cnote_old_pr_flags_buf_t	Conv32_cnote_old_pr_flags_buf_t
673 #define	Conv_cnote_proc_flag_buf_t	Conv32_cnote_proc_flag_buf_t
674 #define	Conv_cnote_sigset_buf_t		Conv32_cnote_sigset_buf_t
675 #define	Conv_cnote_fltset_buf_t		Conv32_cnote_fltset_buf_t
676 #define	Conv_cnote_sysset_buf_t		Conv32_cnote_sysset_buf_t
677 #define	Conv_cnote_sa_flags_buf_t	Conv32_cnote_sa_flags_buf_t
678 #define	Conv_cnote_ss_flags_buf_t	Conv32_cnote_ss_flags_buf_t
679 #define	Conv_cnote_cc_content_buf_t	Conv32_cnote_cc_content_buf_t
680 #define	Conv_cnote_auxv_af_buf_t	Conv32_cnote_auxv_af_buf_t
681 #define	Conv_ver_flags_buf_t		Conv32_ver_flags_buf_t
682 #endif
683 
684 
685 
686 
687 /*
688  * Many conversion routines accept a fmt_flags argument of this type
689  * to allow the caller to modify the output. There are two parts to
690  * this value:
691  *
692  *	(1) Format requests (decimal vs hex, etc...)
693  *	(2) The low order bits specified by CONV_MASK_FMT_ALT
694  *		and retrieved by CONV_TYPE_FMT_ALT are integer
695  *		values that specify that an alternate set of
696  *		strings should be used. This is necessary because
697  *		different utilities evolved to use different strings,
698  *		and there are backward compatability guarantees in
699  *		place that prevent changing them.
700  *
701  * These values are designed such that a caller can always supply a
702  * simple 0 in order to receive "default" behavior.
703  */
704 typedef int Conv_fmt_flags_t;
705 
706 /*
707  * The bottom 8 bits of Conv_fmt_flags_t are used to encode
708  * alternative strings.
709  *
710  * If a given conversion routine does not support alternative strings
711  * for a given CONV_FMT_ALT type, it silently ignores the request and
712  * supplies the default set. This means that a utility like dump(1) is
713  * free to specify its special type in every conversion routine call,
714  * without regard to whether it has any special meaning for that particular
715  * routine. It will receive its special strings if there are any, and
716  * the defaults otherwise.
717  */
718 #define	CONV_MASK_FMT_ALT		0xff
719 #define	CONV_TYPE_FMT_ALT(fmt_flags)	(fmt_flags & CONV_MASK_FMT_ALT)
720 
721 #define	CONV_FMT_ALT_DEFAULT	0	/* "Standard" strings */
722 #define	CONV_FMT_ALT_DUMP	1	/* Style of strings used by dump(1) */
723 #define	CONV_FMT_ALT_FILE	2	/* Style of strings used by file(1) */
724 #define	CONV_FMT_ALT_CRLE	3	/* Style of strings used by crle(1) */
725 #define	CONV_FMT_ALT_FULLNAME	4	/* Strings should be full #define */
726 					/* 	(e.g. STB_LOCAL, not LOCL) */
727 
728 /*
729  * Flags that alter standard formatting for conversion routines.
730  * These bits start after the range occupied by CONV_MASK_FMT_ALT.
731  */
732 #define	CONV_FMT_DECIMAL	0x0100	/* conv_invalid_val() should print */
733 					/*    integer print as decimal */
734 					/*    (default is hex) */
735 #define	CONV_FMT_SPACE		0x0200	/* conv_invalid_val() should append */
736 					/*    a space after the number.  */
737 #define	CONV_FMT_NOBKT		0x0400	/* conv_expn_field() should omit */
738 					/*    prefix and suffix strings */
739 
740 
741 /*
742  * The expansion of bit-field data items is driven from a value descriptor and
743  * the conv_expn_field() routine.
744  */
745 typedef struct {
746 	Xword		v_val;		/* expansion value */
747 	const char	*v_msg;		/* associated message string */
748 } Val_desc;
749 
750 /*
751  * conv_expn_field() is willing to supply default strings for the
752  * prefix, separator, and suffix arguments, if they are passed as NULL.
753  * The caller needs to know how much room to allow for these items.
754  * These values supply those sizes.
755  */
756 #define	CONV_EXPN_FIELD_DEF_PREFIX_SIZE	2	/* Default is "[ " */
757 #define	CONV_EXPN_FIELD_DEF_SEP_SIZE	1	/* Default is " " */
758 #define	CONV_EXPN_FIELD_DEF_SUFFIX_SIZE	2	/* Default is " ]" */
759 
760 /*
761  * conv_expn_field() requires a large number of inputs, many of which
762  * can be NULL to accept default behavior. An argument of the following
763  * type is used to supply them.
764  */
765 typedef struct {
766 	char *buf;		/* Buffer to receive generated string */
767 	size_t bufsize;		/* sizeof(buf) */
768 	const Val_desc *vdp;	/* Array of value descriptors, giving the */
769 				/*	possible bit values, and their */
770 				/*	corresponding strings. Note that the */
771 				/*	final element must contain only NULL */
772 				/*	values. This terminates the list. */
773 	const char **lead_str;	/* NULL, or array of pointers to strings to */
774 				/*	be output at the head of the list. */
775 				/*	Last entry must be NULL. */
776 	Xword oflags;		/* Bits for which output strings are desired */
777 	Xword rflags;		/* Bits for which a numeric value should be */
778 				/*	output if vdp does not provide str. */
779 				/*	Must be a proper subset of oflags */
780 	const char *prefix;	/* NULL, or string to prefix output with */
781 				/*	If NULL, "[ " is used. */
782 	const char *sep;	/* NULL, or string to separate output items */
783 				/*	with. If NULL, " " is used. */
784 	const char *suffix;	/* NULL, or string to suffix output with */
785 				/*	If NULL, " ]" is used. */
786 } CONV_EXPN_FIELD_ARG;
787 
788 
789 /*
790  * Callback function for conv_str_to_c_literal(). A user supplied function
791  * of this type is called by conv_str_to_c_literal() in order to dispatch
792  * the translated output characters.
793  *
794  *	buf - Pointer to output text
795  *	n - # of characters to output
796  *	uvalue - User value argument to conv_str_to_c_literal(),
797  *		passed through without interpretation.
798  */
799 typedef	void		Conv_str_to_c_literal_func_t(const void *ptr,
800 			    size_t size, void *uvalue);
801 
802 /*
803  * Define all generic interfaces.
804  */
805 extern	uchar_t		conv_check_native(char **, char **);
806 extern	const char	*conv_config_feat(int, Conv_config_feat_buf_t *);
807 extern	const char	*conv_config_obj(ushort_t, Conv_config_obj_buf_t *);
808 extern	const char	*conv_config_upm(const char *, const char *,
809 			    const char *, size_t);
810 extern	const char	*conv_cnote_auxv_af(Word, Conv_fmt_flags_t,
811 			    Conv_cnote_auxv_af_buf_t *);
812 extern	const char	*conv_cnote_auxv_type(Word, Conv_fmt_flags_t,
813 			    Conv_inv_buf_t *);
814 extern	const char	*conv_cnote_cc_content(Lword, Conv_fmt_flags_t,
815 			    Conv_cnote_cc_content_buf_t *);
816 extern	const char	*conv_cnote_errno(int, Conv_fmt_flags_t,
817 			    Conv_inv_buf_t *);
818 extern	const char	*conv_cnote_fault(Word, Conv_fmt_flags_t,
819 			    Conv_inv_buf_t *);
820 extern	const char	*conv_cnote_fltset(uint32_t *, int,
821 			    Conv_fmt_flags_t, Conv_cnote_fltset_buf_t *);
822 extern	const char	*conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
823 			    Conv_cnote_old_pr_flags_buf_t *);
824 extern	const char	*conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t,
825 			    Conv_inv_buf_t *);
826 extern	const char	*conv_cnote_pr_flags(int, Conv_fmt_flags_t,
827 			    Conv_cnote_pr_flags_buf_t *);
828 extern	const char	*conv_cnote_proc_flag(int, Conv_fmt_flags_t,
829 			    Conv_cnote_proc_flag_buf_t *);
830 extern	const char	*conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
831 			    Conv_inv_buf_t *inv_buf);
832 extern	const char	*conv_cnote_pr_stype(Word, Conv_fmt_flags_t,
833 			    Conv_inv_buf_t *);
834 extern	const char	*conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
835 			    Conv_inv_buf_t *);
836 extern	const char	*conv_cnote_pr_why(short, Conv_fmt_flags_t,
837 			    Conv_inv_buf_t *);
838 extern	const char	*conv_cnote_priv(int, Conv_fmt_flags_t,
839 			    Conv_inv_buf_t *);
840 extern	const char	*conv_cnote_psetid(int, Conv_fmt_flags_t,
841 			    Conv_inv_buf_t *);
842 extern	const char	*conv_cnote_sa_flags(int, Conv_fmt_flags_t,
843 			    Conv_cnote_sa_flags_buf_t *);
844 extern	const char	*conv_cnote_signal(Word, Conv_fmt_flags_t,
845 			    Conv_inv_buf_t *);
846 extern	const char	*conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
847 			    Conv_inv_buf_t *);
848 extern	const char	*conv_cnote_sigset(uint32_t *, int,
849 			    Conv_fmt_flags_t, Conv_cnote_sigset_buf_t *);
850 extern	const char	*conv_cnote_ss_flags(int, Conv_fmt_flags_t,
851 			    Conv_cnote_ss_flags_buf_t *);
852 extern	const char	*conv_cnote_syscall(Word, Conv_fmt_flags_t,
853 			    Conv_inv_buf_t *);
854 extern	const char	*conv_cnote_sysset(uint32_t *, int,
855 			    Conv_fmt_flags_t, Conv_cnote_sysset_buf_t *);
856 extern	const char	*conv_cnote_type(Word, Conv_fmt_flags_t,
857 			    Conv_inv_buf_t *);
858 extern	const char	*conv_def_tag(Symref, Conv_inv_buf_t *);
859 extern	const char	*conv_demangle_name(const char *);
860 extern	const char	*conv_dl_flag(int, Conv_fmt_flags_t,
861 			    Conv_dl_flag_buf_t *);
862 extern	const char	*conv_dl_mode(int, int, Conv_dl_mode_buf_t *);
863 extern	const char	*conv_dwarf_ehe(uint_t, Conv_dwarf_ehe_buf_t *);
864 extern	const char	*conv_elfdata_type(Elf_Type, Conv_inv_buf_t *);
865 extern	const char	*conv_grphdl_flags(uint_t, Conv_grphdl_flags_buf_t *);
866 extern	const char	*conv_grpdesc_flags(uint_t, Conv_grpdesc_flags_buf_t *);
867 extern	Isa_desc	*conv_isalist(void);
868 extern	const char	*conv_lddstub(int);
869 extern	const char	*conv_seg_flags(Half, Conv_seg_flags_buf_t *);
870 extern	int		conv_sys_eclass();
871 extern	void		conv_str_to_c_literal(const char *buf, size_t n,
872 			    Conv_str_to_c_literal_func_t *cb_func,
873 			    void *uvalue);
874 extern	Uts_desc	*conv_uts(void);
875 extern	const char	*conv_ver_flags(Half, Conv_fmt_flags_t,
876 			    Conv_ver_flags_buf_t *);
877 extern	const char	*conv_ver_index(Versym, int, Conv_inv_buf_t *);
878 
879 
880 /*
881  * Define all class specific routines.
882  */
883 #if	defined(_ELF64)
884 #define	conv_bnd_obj		conv64_bnd_obj
885 #define	conv_bnd_type		conv64_bnd_type
886 #define	conv_cap_tag		conv64_cap_tag
887 #define	conv_cap_val		conv64_cap_val
888 #define	conv_cap_val_hw1	conv64_cap_val_hw1
889 #define	conv_cap_val_sf1	conv64_cap_val_sf1
890 #define	conv_dyn_feature1	conv64_dyn_feature1
891 #define	conv_dyn_flag1		conv64_dyn_flag1
892 #define	conv_dyn_flag		conv64_dyn_flag
893 #define	conv_dyn_posflag1	conv64_dyn_posflag1
894 #define	conv_dyn_tag		conv64_dyn_tag
895 #define	conv_ehdr_class		conv64_ehdr_class
896 #define	conv_ehdr_data		conv64_ehdr_data
897 #define	conv_ehdr_flags		conv64_ehdr_flags
898 #define	conv_ehdr_mach		conv64_ehdr_mach
899 #define	conv_ehdr_osabi		conv64_ehdr_osabi
900 #define	conv_ehdr_type		conv64_ehdr_type
901 #define	conv_ehdr_vers		conv64_ehdr_vers
902 #define	conv_expn_field		conv64_expn_field
903 #define	conv_invalid_val	conv64_invalid_val
904 #define	conv_phdr_flags		conv64_phdr_flags
905 #define	conv_phdr_type		conv64_phdr_type
906 #define	conv_reject_desc	conv64_reject_desc
907 #define	conv_reloc_type		conv64_reloc_type
908 #define	conv_reloc_type_static	conv64_reloc_type_static
909 #define	conv_reloc_386_type	conv64_reloc_386_type
910 #define	conv_reloc_amd64_type	conv64_reloc_amd64_type
911 #define	conv_reloc_SPARC_type	conv64_reloc_SPARC_type
912 #define	conv_sec_flags		conv64_sec_flags
913 #define	conv_sec_linkinfo	conv64_sec_linkinfo
914 #define	conv_sec_type		conv64_sec_type
915 #define	conv_sym_info_bind	conv64_sym_info_bind
916 #define	conv_sym_info_type	conv64_sym_info_type
917 #define	conv_sym_shndx		conv64_sym_shndx
918 #define	conv_sym_other		conv64_sym_other
919 #define	conv_sym_other_vis	conv64_sym_other_vis
920 #define	conv_sym_value		conv64_sym_value
921 #define	conv_sym_SPARC_value	conv64_sym_SPARC_value
922 #define	conv_syminfo_flags	conv64_syminfo_flags
923 #else
924 #define	conv_bnd_obj		conv32_bnd_obj
925 #define	conv_bnd_type		conv32_bnd_type
926 #define	conv_cap_tag		conv32_cap_tag
927 #define	conv_cap_val		conv32_cap_val
928 #define	conv_cap_val_hw1	conv32_cap_val_hw1
929 #define	conv_cap_val_sf1	conv32_cap_val_sf1
930 #define	conv_dyn_feature1	conv32_dyn_feature1
931 #define	conv_dyn_flag1		conv32_dyn_flag1
932 #define	conv_dyn_flag		conv32_dyn_flag
933 #define	conv_dyn_posflag1	conv32_dyn_posflag1
934 #define	conv_dyn_tag		conv32_dyn_tag
935 #define	conv_ehdr_class		conv32_ehdr_class
936 #define	conv_ehdr_data		conv32_ehdr_data
937 #define	conv_ehdr_flags		conv32_ehdr_flags
938 #define	conv_ehdr_mach		conv32_ehdr_mach
939 #define	conv_ehdr_osabi		conv32_ehdr_osabi
940 #define	conv_ehdr_type		conv32_ehdr_type
941 #define	conv_ehdr_vers		conv32_ehdr_vers
942 #define	conv_expn_field		conv32_expn_field
943 #define	conv_invalid_val	conv32_invalid_val
944 #define	conv_phdr_flags		conv32_phdr_flags
945 #define	conv_phdr_type		conv32_phdr_type
946 #define	conv_reject_desc	conv32_reject_desc
947 #define	conv_reloc_type		conv32_reloc_type
948 #define	conv_reloc_type_static	conv32_reloc_type_static
949 #define	conv_reloc_386_type	conv32_reloc_386_type
950 #define	conv_reloc_amd64_type	conv32_reloc_amd64_type
951 #define	conv_reloc_SPARC_type	conv32_reloc_SPARC_type
952 #define	conv_sec_flags		conv32_sec_flags
953 #define	conv_sec_linkinfo	conv32_sec_linkinfo
954 #define	conv_sec_type		conv32_sec_type
955 #define	conv_sym_info_bind	conv32_sym_info_bind
956 #define	conv_sym_info_type	conv32_sym_info_type
957 #define	conv_sym_shndx		conv32_sym_shndx
958 #define	conv_sym_other		conv32_sym_other
959 #define	conv_sym_other_vis	conv32_sym_other_vis
960 #define	conv_sym_value		conv32_sym_value
961 #define	conv_sym_SPARC_value	conv32_sym_SPARC_value
962 #define	conv_syminfo_flags	conv32_syminfo_flags
963 #endif
964 
965 extern	const char	*conv_bnd_obj(uint_t, Conv_bnd_obj_buf_t *);
966 extern	const char	*conv_bnd_type(uint_t, Conv_bnd_type_buf_t *);
967 extern	const char	*conv_cap_tag(Xword, Conv_inv_buf_t *);
968 extern	const char	*conv_cap_val(Xword, Xword, Half, Conv_cap_val_buf_t *);
969 extern	const char	*conv_cap_val_hw1(Xword, Half, Conv_fmt_flags_t,
970 			    Conv_cap_val_hw1_buf_t *);
971 extern	const char	*conv_cap_val_sf1(Xword, Half, Conv_fmt_flags_t,
972 			    Conv_cap_val_sf1_buf_t *);
973 extern	const char	*conv_dyn_flag1(Xword, Conv_fmt_flags_t,
974 			    Conv_dyn_flag1_buf_t *);
975 extern	const char	*conv_dyn_flag(Xword, Conv_fmt_flags_t,
976 			    Conv_dyn_flag_buf_t *);
977 extern	const char	*conv_dyn_posflag1(Xword, Conv_fmt_flags_t,
978 			    Conv_dyn_posflag1_buf_t *);
979 extern	const char	*conv_dyn_tag(Xword, Half, Conv_fmt_flags_t,
980 			    Conv_inv_buf_t *);
981 extern	const char	*conv_dyn_feature1(Xword, Conv_fmt_flags_t,
982 			    Conv_dyn_feature1_buf_t *);
983 extern	const char	*conv_ehdr_class(uchar_t, Conv_fmt_flags_t,
984 			    Conv_inv_buf_t *);
985 extern	const char	*conv_ehdr_data(uchar_t, Conv_fmt_flags_t,
986 			    Conv_inv_buf_t *);
987 extern	const char	*conv_ehdr_flags(Half, Word, Conv_fmt_flags_t,
988 			    Conv_ehdr_flags_buf_t *);
989 extern	const char	*conv_ehdr_mach(Half, Conv_fmt_flags_t,
990 			    Conv_inv_buf_t *);
991 extern	const char	*conv_ehdr_osabi(uchar_t, Conv_fmt_flags_t,
992 			    Conv_inv_buf_t *);
993 extern	const char	*conv_ehdr_type(Half, Conv_fmt_flags_t,
994 			    Conv_inv_buf_t *);
995 extern	const char	*conv_ehdr_vers(Word, Conv_fmt_flags_t,
996 			    Conv_inv_buf_t *);
997 extern	int		conv_expn_field(CONV_EXPN_FIELD_ARG *,
998 			    Conv_fmt_flags_t);
999 extern	const char	*conv_invalid_val(Conv_inv_buf_t *, Xword,
1000 			    Conv_fmt_flags_t);
1001 extern	const char	*conv_phdr_flags(Word, Conv_fmt_flags_t fmt_flags,
1002 			    Conv_phdr_flags_buf_t *);
1003 extern	const char	*conv_phdr_type(Half, Word, Conv_fmt_flags_t,
1004 			    Conv_inv_buf_t *);
1005 extern	const char	*conv_reject_desc(Rej_desc *, Conv_reject_desc_buf_t *,
1006 			    Half mach);
1007 extern	const char	*conv_reloc_type(Half, Word, Conv_fmt_flags_t,
1008 			    Conv_inv_buf_t *);
1009 extern	const char	*conv_reloc_type_static(Half, Word, Conv_fmt_flags_t);
1010 extern	const char	*conv_reloc_386_type(Word, Conv_fmt_flags_t,
1011 			    Conv_inv_buf_t *);
1012 extern	const char	*conv_reloc_amd64_type(Word, Conv_fmt_flags_t,
1013 			    Conv_inv_buf_t *);
1014 extern	const char	*conv_reloc_SPARC_type(Word, Conv_fmt_flags_t,
1015 			    Conv_inv_buf_t *);
1016 extern	const char	*conv_sec_flags(Xword, Conv_fmt_flags_t,
1017 			    Conv_sec_flags_buf_t *);
1018 extern	const char	*conv_sec_linkinfo(Word, Xword, Conv_inv_buf_t *);
1019 extern	const char	*conv_sec_type(Half, Word, Conv_fmt_flags_t,
1020 			    Conv_inv_buf_t *);
1021 extern	const char	*conv_sym_info_bind(uchar_t, Conv_fmt_flags_t,
1022 			    Conv_inv_buf_t *);
1023 extern	const char	*conv_sym_info_type(Half, uchar_t, Conv_fmt_flags_t,
1024 			    Conv_inv_buf_t *);
1025 extern	const char	*conv_sym_shndx(Half, Conv_inv_buf_t *);
1026 extern	const char	*conv_sym_other(uchar_t, Conv_inv_buf_t *);
1027 extern	const char	*conv_sym_other_vis(uchar_t, Conv_fmt_flags_t,
1028 			    Conv_inv_buf_t *);
1029 extern	const char	*conv_sym_value(Half, uchar_t, Addr, Conv_inv_buf_t *);
1030 extern	const char	*conv_sym_SPARC_value(Addr, Conv_fmt_flags_t,
1031 			    Conv_inv_buf_t *);
1032 extern	const char	*conv_syminfo_flags(Xword, Conv_fmt_flags_t,
1033 			    Conv_syminfo_flags_buf_t *);
1034 
1035 #ifdef	__cplusplus
1036 }
1037 #endif
1038 
1039 #endif /* _CONV_H */
1040