10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51618Srie * Common Development and Distribution License (the "License"). 61618Srie * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 211618Srie 220Sstevel@tonic-gate /* 230Sstevel@tonic-gate * Copyright (c) 1988 AT&T 240Sstevel@tonic-gate * All Rights Reserved 250Sstevel@tonic-gate * 26*6206Sab196087 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 271618Srie * Use is subject to license terms. 280Sstevel@tonic-gate */ 290Sstevel@tonic-gate 300Sstevel@tonic-gate #ifndef _CONV_H 310Sstevel@tonic-gate #define _CONV_H 320Sstevel@tonic-gate 330Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 340Sstevel@tonic-gate 350Sstevel@tonic-gate /* 360Sstevel@tonic-gate * Global include file for conversion library. 370Sstevel@tonic-gate */ 380Sstevel@tonic-gate 390Sstevel@tonic-gate #include <stdlib.h> 400Sstevel@tonic-gate #include <libelf.h> 410Sstevel@tonic-gate #include <dlfcn.h> 420Sstevel@tonic-gate #include <libld.h> 430Sstevel@tonic-gate #include <sgs.h> 440Sstevel@tonic-gate 450Sstevel@tonic-gate #ifdef __cplusplus 460Sstevel@tonic-gate extern "C" { 470Sstevel@tonic-gate #endif 480Sstevel@tonic-gate 490Sstevel@tonic-gate /* 500Sstevel@tonic-gate * Configuration features available - maintained here (instead of debug.h) 510Sstevel@tonic-gate * to save libconv from having to include debug.h which results in numerous 520Sstevel@tonic-gate * "declared but not used or defined" lint errors. 530Sstevel@tonic-gate */ 540Sstevel@tonic-gate #define CONF_EDLIBPATH 0x000100 /* ELF default library path */ 550Sstevel@tonic-gate #define CONF_ESLIBPATH 0x000200 /* ELF secure library path */ 560Sstevel@tonic-gate #define CONF_ADLIBPATH 0x000400 /* AOUT default library path */ 570Sstevel@tonic-gate #define CONF_ASLIBPATH 0x000800 /* AOUT secure library path */ 580Sstevel@tonic-gate #define CONF_DIRCFG 0x001000 /* directory configuration available */ 590Sstevel@tonic-gate #define CONF_OBJALT 0x002000 /* object alternatives available */ 600Sstevel@tonic-gate #define CONF_MEMRESV 0x004000 /* memory reservation required */ 610Sstevel@tonic-gate #define CONF_ENVS 0x008000 /* environment variables available */ 620Sstevel@tonic-gate #define CONF_FLTR 0x010000 /* filter information available */ 630Sstevel@tonic-gate #define CONF_FEATMSK 0xffff00 640Sstevel@tonic-gate 650Sstevel@tonic-gate /* 664734Sab196087 * Buffer types: 674734Sab196087 * 684734Sab196087 * Many of the routines in this module require the user to supply a 694734Sab196087 * buffer into which the desired strings may be written. These are 704734Sab196087 * all arrays of characters, and might be defined as simple arrays 714734Sab196087 * of char. The problem with that approach is that when such an array 724734Sab196087 * is passed to a function, the C language considers it to have the 734734Sab196087 * type (char *), without any regard to its length. Not all of our 744734Sab196087 * buffers have the same length, and we want to ensure that the compiler 754734Sab196087 * will refuse to compile code that passes the wrong type of buffer to 764734Sab196087 * a given routine. The solution is to define the buffers as unions 774734Sab196087 * that contain the needed array, and then to pass the given union 784734Sab196087 * by address. The compiler will catch attempts to pass the wrong type 794734Sab196087 * of pointer, and the size of a structure/union is implicit in its type. 804734Sab196087 * 814734Sab196087 * A nice side effect of this approach is that we can use a union with 824734Sab196087 * multiple buffers to handle the cases where a given routine needs 834734Sab196087 * more than one type of buffer. The end result is a single buffer large 844734Sab196087 * enough to handle any of the subcases, but no larger. 854734Sab196087 */ 864734Sab196087 874734Sab196087 /* 884734Sab196087 * Size of buffer used by conv_invalid_val(): 894734Sab196087 * 901618Srie * Various values that can't be matched to a symbolic definition are converted 914734Sab196087 * to a numeric string. 924734Sab196087 * 934734Sab196087 * The buffer size reflects the maximum number of digits needed to 944734Sab196087 * display an integer as text, plus a trailing null, and with room for 954734Sab196087 * a leading "0x" if hexidecimal display is selected. 964734Sab196087 */ 974734Sab196087 #define CONV32_INV_BUFSIZE 12 984734Sab196087 typedef union { 994734Sab196087 char buf[CONV32_INV_BUFSIZE]; 1004734Sab196087 } Conv32_inv_buf_t; 1014734Sab196087 1024734Sab196087 #define CONV64_INV_BUFSIZE 22 1034734Sab196087 typedef union { 1044734Sab196087 char buf[CONV64_INV_BUFSIZE]; 1054734Sab196087 } Conv64_inv_buf_t; 1064734Sab196087 1074734Sab196087 1084734Sab196087 1094734Sab196087 /* conv_ehdr_flags() */ 1105088Sab196087 #define CONV_EHDR_FLAGS_BASE_BUFSIZE 69 1114734Sab196087 #define CONV32_EHDR_FLAGS_BUFSIZE \ 1125088Sab196087 (CONV_EHDR_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 1134734Sab196087 typedef union { 1144734Sab196087 Conv32_inv_buf_t inv_buf; 1154734Sab196087 char buf[CONV32_EHDR_FLAGS_BUFSIZE]; 1164734Sab196087 } Conv32_ehdr_flags_buf_t; 1174734Sab196087 1184734Sab196087 #define CONV64_EHDR_FLAGS_BUFSIZE \ 1195088Sab196087 (CONV_EHDR_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 1204734Sab196087 typedef union { 1214734Sab196087 Conv64_inv_buf_t inv_buf; 1224734Sab196087 char buf[CONV64_EHDR_FLAGS_BUFSIZE]; 1234734Sab196087 } Conv64_ehdr_flags_buf_t; 1244734Sab196087 1254734Sab196087 1264734Sab196087 /* conv_reject_desc() */ 1274734Sab196087 typedef union { 1284734Sab196087 Conv32_inv_buf_t inv_buf; 1294734Sab196087 Conv32_ehdr_flags_buf_t flags_buf; 1304734Sab196087 } Conv32_reject_desc_buf_t; 1314734Sab196087 1324734Sab196087 typedef union { 1334734Sab196087 Conv64_inv_buf_t inv_buf; 1344734Sab196087 Conv64_ehdr_flags_buf_t flags_buf; 1354734Sab196087 } Conv64_reject_desc_buf_t; 1364734Sab196087 1374734Sab196087 1384734Sab196087 /* 1394734Sab196087 * conv_cap_val_hw1() 1404734Sab196087 * 1414734Sab196087 * This size is based on the maximum number of hardware capabilities 1424734Sab196087 * that exist. See common/elfcap. 1434734Sab196087 */ 1444734Sab196087 #define CONV_CAP_VAL_HW1_BUFSIZE 195 1454734Sab196087 1464734Sab196087 typedef union { 1474734Sab196087 Conv32_inv_buf_t inv_buf; 1484734Sab196087 char buf[CONV_CAP_VAL_HW1_BUFSIZE]; 1494734Sab196087 } Conv32_cap_val_hw1_buf_t; 1504734Sab196087 1514734Sab196087 typedef union { 1524734Sab196087 Conv64_inv_buf_t inv_buf; 1534734Sab196087 char buf[CONV_CAP_VAL_HW1_BUFSIZE]; 1544734Sab196087 } Conv64_cap_val_hw1_buf_t; 1554734Sab196087 1564734Sab196087 1574734Sab196087 /* 1584734Sab196087 * conv_cap_val_sf1() 1591618Srie * 1604734Sab196087 * This size is based on the maximum number of software capabilities 1614734Sab196087 * that exist. See common/elfcap. 1624734Sab196087 */ 1634734Sab196087 #define CONV_CAP_VAL_SF1_BUFSIZE 45 1644734Sab196087 1654734Sab196087 typedef union { 1664734Sab196087 Conv32_inv_buf_t inv_buf; 1674734Sab196087 char buf[CONV_CAP_VAL_SF1_BUFSIZE]; 1684734Sab196087 } Conv32_cap_val_sf1_buf_t; 1694734Sab196087 1704734Sab196087 typedef union { 1714734Sab196087 Conv64_inv_buf_t inv_buf; 1724734Sab196087 char buf[CONV_CAP_VAL_SF1_BUFSIZE]; 1734734Sab196087 } Conv64_cap_val_sf1_buf_t; 1744734Sab196087 1754734Sab196087 1764734Sab196087 1774734Sab196087 /* conv_cap_val_buf() */ 1784734Sab196087 typedef union { 1794734Sab196087 Conv32_inv_buf_t inv_buf; 1804734Sab196087 Conv32_cap_val_hw1_buf_t cap_val_hw1_buf; 1814734Sab196087 Conv32_cap_val_sf1_buf_t cap_val_sf1_buf; 1824734Sab196087 } Conv32_cap_val_buf_t; 1834734Sab196087 1844734Sab196087 typedef union { 1854734Sab196087 Conv64_inv_buf_t inv_buf; 1864734Sab196087 Conv64_cap_val_hw1_buf_t cap_val_hw1_buf; 1874734Sab196087 Conv64_cap_val_sf1_buf_t cap_val_sf1_buf; 1884734Sab196087 } Conv64_cap_val_buf_t; 1894734Sab196087 1904734Sab196087 1914734Sab196087 /* conv_config_feat() */ 1925152Sab196087 #define CONV_CONFIG_FEAT_BUFSIZE 194 1934734Sab196087 1944734Sab196087 typedef union { 1954734Sab196087 Conv32_inv_buf_t inv_buf; 1964734Sab196087 char buf[CONV_CONFIG_FEAT_BUFSIZE]; 1974734Sab196087 } Conv32_config_feat_buf_t; 1984734Sab196087 1994734Sab196087 typedef union { 2004734Sab196087 Conv64_inv_buf_t inv_buf; 2014734Sab196087 char buf[CONV_CONFIG_FEAT_BUFSIZE]; 2024734Sab196087 } Conv64_config_feat_buf_t; 2034734Sab196087 2044734Sab196087 2054734Sab196087 /* conv_config_obj() */ 2064734Sab196087 #define CONV_CONFIG_OBJ_BUFSIZE 154 2074734Sab196087 2084734Sab196087 typedef union { 2094734Sab196087 Conv32_inv_buf_t inv_buf; 2104734Sab196087 char buf[CONV_CONFIG_OBJ_BUFSIZE]; 2114734Sab196087 } Conv32_config_obj_buf_t; 2124734Sab196087 2134734Sab196087 typedef union { 2144734Sab196087 Conv64_inv_buf_t inv_buf; 2154734Sab196087 char buf[CONV_CONFIG_OBJ_BUFSIZE]; 2164734Sab196087 } Conv64_config_obj_buf_t; 2174734Sab196087 2184734Sab196087 2194734Sab196087 /* conv_dl_mode() */ 2204734Sab196087 #define CONV_DL_MODE_BUFSIZE 122 2214734Sab196087 2224734Sab196087 typedef union { 2234734Sab196087 Conv32_inv_buf_t inv_buf; 2244734Sab196087 char buf[CONV_DL_MODE_BUFSIZE]; 2254734Sab196087 } Conv32_dl_mode_buf_t; 2264734Sab196087 2274734Sab196087 typedef union { 2284734Sab196087 Conv64_inv_buf_t inv_buf; 2294734Sab196087 char buf[CONV_DL_MODE_BUFSIZE]; 2304734Sab196087 } Conv64_dl_mode_buf_t; 2314734Sab196087 2324734Sab196087 2334734Sab196087 /* conv_dl_flag() */ 2345152Sab196087 #define CONV_DL_FLAG_BUFSIZE 175 2354734Sab196087 2364734Sab196087 typedef union { 2374734Sab196087 Conv32_inv_buf_t inv_buf; 2384734Sab196087 char buf[CONV_DL_FLAG_BUFSIZE]; 2394734Sab196087 } Conv32_dl_flag_buf_t; 2404734Sab196087 2414734Sab196087 typedef union { 2424734Sab196087 Conv64_inv_buf_t inv_buf; 2434734Sab196087 char buf[CONV_DL_FLAG_BUFSIZE]; 2444734Sab196087 } Conv64_dl_flag_buf_t; 2454734Sab196087 2464734Sab196087 2474734Sab196087 /* conv_grphdl_flags() */ 2485067Srie #define CONV_GRPHDL_FLAGS_BUFSIZE 82 2494734Sab196087 2504734Sab196087 typedef union { 2514734Sab196087 Conv32_inv_buf_t inv_buf; 2524734Sab196087 char buf[CONV_GRPHDL_FLAGS_BUFSIZE]; 2534734Sab196087 } Conv32_grphdl_flags_buf_t; 2544734Sab196087 2554734Sab196087 typedef union { 2564734Sab196087 Conv64_inv_buf_t inv_buf; 2574734Sab196087 char buf[CONV_GRPHDL_FLAGS_BUFSIZE]; 2584734Sab196087 } Conv64_grphdl_flags_buf_t; 2594734Sab196087 2604734Sab196087 2614734Sab196087 /* conv_grpdesc_flags() */ 2625067Srie #define CONV_GRPDESC_FLAGS_BUFSIZE 92 2634734Sab196087 2644734Sab196087 typedef union { 2654734Sab196087 Conv32_inv_buf_t inv_buf; 2664734Sab196087 char buf[CONV_GRPDESC_FLAGS_BUFSIZE]; 2674734Sab196087 } Conv32_grpdesc_flags_buf_t; 2684734Sab196087 2694734Sab196087 typedef union { 2704734Sab196087 Conv64_inv_buf_t inv_buf; 2714734Sab196087 char buf[CONV_GRPDESC_FLAGS_BUFSIZE]; 2724734Sab196087 } Conv64_grpdesc_flags_buf_t; 2734734Sab196087 2744734Sab196087 2754734Sab196087 /* conv_seg_flags() */ 2764734Sab196087 #define CONV_SEG_FLAGS_BUFSIZE 186 2774734Sab196087 2784734Sab196087 typedef union { 2794734Sab196087 Conv32_inv_buf_t inv_buf; 2804734Sab196087 char buf[CONV_SEG_FLAGS_BUFSIZE]; 2814734Sab196087 } Conv32_seg_flags_buf_t; 2824734Sab196087 2834734Sab196087 typedef union { 2844734Sab196087 Conv64_inv_buf_t inv_buf; 2854734Sab196087 char buf[CONV_SEG_FLAGS_BUFSIZE]; 2864734Sab196087 } Conv64_seg_flags_buf_t; 2874734Sab196087 2884734Sab196087 2894734Sab196087 /* conv_dyn_posflag1() */ 2905088Sab196087 #define CONV_DYN_POSFLAG1_BASE_BUFSIZE 23 2914734Sab196087 #define CONV32_DYN_POSFLAG1_BUFSIZE \ 2925088Sab196087 (CONV_DYN_POSFLAG1_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 2934734Sab196087 typedef union { 2944734Sab196087 Conv32_inv_buf_t inv_buf; 2954734Sab196087 char buf[CONV32_DYN_POSFLAG1_BUFSIZE]; 2964734Sab196087 } Conv32_dyn_posflag1_buf_t; 2974734Sab196087 2984734Sab196087 #define CONV64_DYN_POSFLAG1_BUFSIZE \ 2995088Sab196087 (CONV_DYN_POSFLAG1_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3004734Sab196087 typedef union { 3014734Sab196087 Conv64_inv_buf_t inv_buf; 3024734Sab196087 char buf[CONV64_DYN_POSFLAG1_BUFSIZE]; 3034734Sab196087 } Conv64_dyn_posflag1_buf_t; 3044734Sab196087 3054734Sab196087 3064734Sab196087 /* conv_dyn_flag() */ 3075088Sab196087 #define CONV_DYN_FLAG_BASE_BUFSIZE 48 3084734Sab196087 #define CONV32_DYN_FLAG_BUFSIZE \ 3095088Sab196087 (CONV_DYN_FLAG_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3104734Sab196087 typedef union { 3114734Sab196087 Conv32_inv_buf_t inv_buf; 3124734Sab196087 char buf[CONV32_DYN_FLAG_BUFSIZE]; 3134734Sab196087 } Conv32_dyn_flag_buf_t; 3144734Sab196087 3154734Sab196087 #define CONV64_DYN_FLAG_BUFSIZE \ 3165088Sab196087 (CONV_DYN_FLAG_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3174734Sab196087 typedef union { 3184734Sab196087 Conv64_inv_buf_t inv_buf; 3194734Sab196087 char buf[CONV64_DYN_FLAG_BUFSIZE]; 3204734Sab196087 } Conv64_dyn_flag_buf_t; 3214734Sab196087 3224734Sab196087 3234734Sab196087 /* conv_dyn_flag1() */ 3245220Srie #define CONV_DYN_FLAG1_BASE_BUFSIZE 265 3254734Sab196087 #define CONV32_DYN_FLAG1_BUFSIZE \ 3265088Sab196087 (CONV_DYN_FLAG1_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3274734Sab196087 typedef union { 3284734Sab196087 Conv32_inv_buf_t inv_buf; 3294734Sab196087 char buf[CONV32_DYN_FLAG1_BUFSIZE]; 3304734Sab196087 } Conv32_dyn_flag1_buf_t; 3314734Sab196087 3324734Sab196087 #define CONV64_DYN_FLAG1_BUFSIZE \ 3335088Sab196087 (CONV_DYN_FLAG1_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3344734Sab196087 typedef union { 3354734Sab196087 Conv64_inv_buf_t inv_buf; 3364734Sab196087 char buf[CONV64_DYN_FLAG1_BUFSIZE]; 3374734Sab196087 } Conv64_dyn_flag1_buf_t; 3384734Sab196087 3394734Sab196087 3404734Sab196087 /* conv_dyn_feature1() */ 3415088Sab196087 #define CONV_DYN_FEATURE1_BASE_BUFSIZE 20 3424734Sab196087 #define CONV32_DYN_FEATURE1_BUFSIZE \ 3435088Sab196087 (CONV_DYN_FEATURE1_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3444734Sab196087 typedef union { 3454734Sab196087 Conv32_inv_buf_t inv_buf; 3464734Sab196087 char buf[CONV32_DYN_FEATURE1_BUFSIZE]; 3474734Sab196087 } Conv32_dyn_feature1_buf_t; 3484734Sab196087 3494734Sab196087 #define CONV64_DYN_FEATURE1_BUFSIZE \ 3505088Sab196087 (CONV_DYN_FEATURE1_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3514734Sab196087 typedef union { 3524734Sab196087 Conv64_inv_buf_t inv_buf; 3534734Sab196087 char buf[CONV64_DYN_FEATURE1_BUFSIZE]; 3544734Sab196087 } Conv64_dyn_feature1_buf_t; 3554734Sab196087 3564734Sab196087 3574734Sab196087 /* conv_bnd_type() */ 3585088Sab196087 #define CONV_BND_TYPE_BASE_BUFSIZE 29 3594734Sab196087 #define CONV32_BND_TYPE_BUFSIZE \ 3605088Sab196087 (CONV_BND_TYPE_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3614734Sab196087 typedef union { 3624734Sab196087 Conv32_inv_buf_t inv_buf; 3634734Sab196087 char buf[CONV32_BND_TYPE_BUFSIZE]; 3644734Sab196087 } Conv32_bnd_type_buf_t; 3654734Sab196087 3664734Sab196087 #define CONV64_BND_TYPE_BUFSIZE \ 3675088Sab196087 (CONV_BND_TYPE_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3684734Sab196087 typedef union { 3694734Sab196087 Conv64_inv_buf_t inv_buf; 3704734Sab196087 char buf[CONV64_BND_TYPE_BUFSIZE]; 3714734Sab196087 } Conv64_bnd_type_buf_t; 3724734Sab196087 3734734Sab196087 3744734Sab196087 /* conv_bnd_obj() */ 3755088Sab196087 #define CONV_BND_OBJ_BASE_BUFSIZE 38 3764734Sab196087 #define CONV32_BND_OBJ_BUFSIZE \ 3775088Sab196087 (CONV_BND_OBJ_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3784734Sab196087 typedef union { 3794734Sab196087 Conv32_inv_buf_t inv_buf; 3804734Sab196087 char buf[CONV32_BND_OBJ_BUFSIZE]; 3814734Sab196087 } Conv32_bnd_obj_buf_t; 3824734Sab196087 3834734Sab196087 #define CONV64_BND_OBJ_BUFSIZE \ 3845088Sab196087 (CONV_BND_OBJ_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3854734Sab196087 typedef union { 3864734Sab196087 Conv64_inv_buf_t inv_buf; 3874734Sab196087 char buf[CONV64_BND_OBJ_BUFSIZE]; 3884734Sab196087 } Conv64_bnd_obj_buf_t; 3894734Sab196087 3904734Sab196087 3914734Sab196087 /* conv_phdr_flags() */ 3925088Sab196087 #define CONV_PHDR_FLAGS_BASE_BUFSIZE 35 3934734Sab196087 #define CONV32_PHDR_FLAGS_BUFSIZE \ 3945088Sab196087 (CONV_PHDR_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3954734Sab196087 typedef union { 3964734Sab196087 Conv32_inv_buf_t inv_buf; 3974734Sab196087 char buf[CONV32_PHDR_FLAGS_BUFSIZE]; 3984734Sab196087 } Conv32_phdr_flags_buf_t; 3994734Sab196087 4004734Sab196087 #define CONV64_PHDR_FLAGS_BUFSIZE \ 4015088Sab196087 (CONV_PHDR_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 4024734Sab196087 typedef union { 4034734Sab196087 Conv64_inv_buf_t inv_buf; 4044734Sab196087 char buf[CONV64_PHDR_FLAGS_BUFSIZE]; 4054734Sab196087 } Conv64_phdr_flags_buf_t; 4064734Sab196087 4074734Sab196087 4084734Sab196087 /* conv_sec_flags() */ 4095088Sab196087 #define CONV_SEC_FLAGS_BASE_BUFSIZE 168 4104734Sab196087 #define CONV32_SEC_FLAGS_BUFSIZE \ 4115088Sab196087 (CONV_SEC_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 4124734Sab196087 typedef union { 4134734Sab196087 Conv32_inv_buf_t inv_buf; 4144734Sab196087 char buf[CONV32_SEC_FLAGS_BUFSIZE]; 4154734Sab196087 } Conv32_sec_flags_buf_t; 4164734Sab196087 4174734Sab196087 #define CONV64_SEC_FLAGS_BUFSIZE \ 4185088Sab196087 (CONV_SEC_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 4194734Sab196087 typedef union { 4204734Sab196087 Conv64_inv_buf_t inv_buf; 4214734Sab196087 char buf[CONV64_SEC_FLAGS_BUFSIZE]; 4224734Sab196087 } Conv64_sec_flags_buf_t; 4234734Sab196087 4244734Sab196087 4254734Sab196087 /* conv_dwarf_ehe() */ 4264734Sab196087 #define CONV_DWARF_EHE_BUFSIZE 33 4274734Sab196087 typedef union { 4284734Sab196087 Conv32_inv_buf_t inv_buf; 4294734Sab196087 char buf[CONV_DWARF_EHE_BUFSIZE]; 4304734Sab196087 } Conv32_dwarf_ehe_buf_t; 4314734Sab196087 typedef union { 4324734Sab196087 Conv64_inv_buf_t inv_buf; 4334734Sab196087 char buf[CONV_DWARF_EHE_BUFSIZE]; 4344734Sab196087 } Conv64_dwarf_ehe_buf_t; 4354734Sab196087 4364734Sab196087 4375088Sab196087 /* conv_syminfo_flags() */ 4385088Sab196087 #define CONV_SYMINFO_FLAGS_BASE_BUFSIZE 36 4395088Sab196087 #define CONV32_SYMINFO_FLAGS_BUFSIZE \ 4405088Sab196087 (CONV_SYMINFO_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 4415088Sab196087 typedef union { 4425088Sab196087 Conv32_inv_buf_t inv_buf; 4435088Sab196087 char buf[CONV32_SYMINFO_FLAGS_BUFSIZE]; 4445088Sab196087 } Conv32_syminfo_flags_buf_t; 4455088Sab196087 4465088Sab196087 #define CONV64_SYMINFO_FLAGS_BUFSIZE \ 4475088Sab196087 (CONV_SYMINFO_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 4485088Sab196087 typedef union { 4495088Sab196087 Conv64_inv_buf_t inv_buf; 4505088Sab196087 char buf[CONV64_SYMINFO_FLAGS_BUFSIZE]; 4515088Sab196087 } Conv64_syminfo_flags_buf_t; 4525088Sab196087 4535088Sab196087 4544734Sab196087 4554734Sab196087 /* 4564734Sab196087 * Generic names for class specific buffer types above 4571618Srie */ 4581618Srie #if defined(_ELF64) 4594734Sab196087 #define CONV_INV_BUFSIZE CONV64_INV_BUFSIZE 4604734Sab196087 #define CONV_EHDR_FLAGS_BUFSIZE CONV64_EHDR_FLAGS_BUFSIZE 4614734Sab196087 #define CONV_DYN_POSFLAG1_BUFSIZE CONV64_DYN_POSFLAG1_BUFSIZE 4624734Sab196087 #define CONV_DYN_FLAG_BUFSIZE CONV64_DYN_FLAG_BUFSIZE 4634734Sab196087 #define CONV_DYN_FLAG1_BUFSIZE CONV64_DYN_FLAG1_BUFSIZE 4644734Sab196087 #define CONV_DYN_FEATURE1_BUFSIZE CONV64_DYN_FEATURE1_BUFSIZE 4654734Sab196087 #define CONV_BND_TYPE_BUFSIZE CONV64_BND_TYPE_BUFSIZE 4664734Sab196087 #define CONV_BND_OBJ_BUFSIZE CONV64_BND_OBJ_BUFSIZE 4674734Sab196087 #define CONV_PHDR_FLAGS_BUFSIZE CONV64_PHDR_FLAGS_BUFSIZE 4684734Sab196087 #define CONV_SEC_FLAGS_BUFSIZE CONV64_SEC_FLAGS_BUFSIZE 4695088Sab196087 #define CONV_SYMINFO_FLAGS_BUFSIZE CONV64_SYMINFO_FLAGS_BUFSIZE 4704734Sab196087 4714734Sab196087 #define Conv_inv_buf_t Conv64_inv_buf_t 4724734Sab196087 #define Conv_ehdr_flags_buf_t Conv64_ehdr_flags_buf_t 4734734Sab196087 #define Conv_reject_desc_buf_t Conv64_reject_desc_buf_t 4744734Sab196087 #define Conv_cap_val_hw1_buf_t Conv64_cap_val_hw1_buf_t 4754734Sab196087 #define Conv_cap_val_sf1_buf_t Conv64_cap_val_sf1_buf_t 4764734Sab196087 #define Conv_cap_val_buf_t Conv64_cap_val_buf_t 4774734Sab196087 #define Conv_config_feat_buf_t Conv64_config_feat_buf_t 4784734Sab196087 #define Conv_config_obj_buf_t Conv64_config_obj_buf_t 4794734Sab196087 #define Conv_dl_mode_buf_t Conv64_dl_mode_buf_t 4804734Sab196087 #define Conv_dl_flag_buf_t Conv64_dl_flag_buf_t 4814734Sab196087 #define Conv_grphdl_flags_buf_t Conv64_grphdl_flags_buf_t 4824734Sab196087 #define Conv_grpdesc_flags_buf_t Conv64_grpdesc_flags_buf_t 4834734Sab196087 #define Conv_seg_flags_buf_t Conv64_seg_flags_buf_t 4844734Sab196087 #define Conv_dyn_posflag1_buf_t Conv64_dyn_posflag1_buf_t 4854734Sab196087 #define Conv_dyn_flag_buf_t Conv64_dyn_flag_buf_t 4864734Sab196087 #define Conv_dyn_flag1_buf_t Conv64_dyn_flag1_buf_t 4874734Sab196087 #define Conv_dyn_feature1_buf_t Conv64_dyn_feature1_buf_t 4884734Sab196087 #define Conv_bnd_type_buf_t Conv64_bnd_type_buf_t 4894734Sab196087 #define Conv_bnd_obj_buf_t Conv64_bnd_obj_buf_t 4904734Sab196087 #define Conv_phdr_flags_buf_t Conv64_phdr_flags_buf_t 4914734Sab196087 #define Conv_sec_flags_buf_t Conv64_sec_flags_buf_t 4924734Sab196087 #define Conv_dwarf_ehe_buf_t Conv64_dwarf_ehe_buf_t 4935088Sab196087 #define Conv_syminfo_flags_buf_t Conv64_syminfo_flags_buf_t 4941618Srie #else 4954734Sab196087 #define CONV_INV_BUFSIZE CONV32_INV_BUFSIZE 4964734Sab196087 #define CONV_EHDR_FLAGS_BUFSIZE CONV32_EHDR_FLAGS_BUFSIZE 4974734Sab196087 #define CONV_DYN_POSFLAG1_BUFSIZE CONV32_DYN_POSFLAG1_BUFSIZE 4984734Sab196087 #define CONV_DYN_FLAG_BUFSIZE CONV32_DYN_FLAG_BUFSIZE 4994734Sab196087 #define CONV_DYN_FLAG1_BUFSIZE CONV32_DYN_FLAG1_BUFSIZE 5004734Sab196087 #define CONV_DYN_FEATURE1_BUFSIZE CONV32_DYN_FEATURE1_BUFSIZE 5014734Sab196087 #define CONV_BND_TYPE_BUFSIZE CONV32_BND_TYPE_BUFSIZE 5024734Sab196087 #define CONV_BND_OBJ_BUFSIZE CONV32_BND_OBJ_BUFSIZE 5034734Sab196087 #define CONV_PHDR_FLAGS_BUFSIZE CONV32_PHDR_FLAGS_BUFSIZE 5044734Sab196087 #define CONV_SEC_FLAGS_BUFSIZE CONV32_SEC_FLAGS_BUFSIZE 5055088Sab196087 #define CONV_SYMINFO_FLAGS_BUFSIZE CONV32_SYMINFO_FLAGS_BUFSIZE 5064734Sab196087 5074734Sab196087 #define Conv_inv_buf_t Conv32_inv_buf_t 5084734Sab196087 #define Conv_ehdr_flags_buf_t Conv32_ehdr_flags_buf_t 5094734Sab196087 #define Conv_reject_desc_buf_t Conv32_reject_desc_buf_t 5104734Sab196087 #define Conv_cap_val_hw1_buf_t Conv32_cap_val_hw1_buf_t 5114734Sab196087 #define Conv_cap_val_sf1_buf_t Conv32_cap_val_sf1_buf_t 5124734Sab196087 #define Conv_cap_val_buf_t Conv32_cap_val_buf_t 5134734Sab196087 #define Conv_config_feat_buf_t Conv32_config_feat_buf_t 5144734Sab196087 #define Conv_config_obj_buf_t Conv32_config_obj_buf_t 5154734Sab196087 #define Conv_dl_mode_buf_t Conv32_dl_mode_buf_t 5164734Sab196087 #define Conv_dl_flag_buf_t Conv32_dl_flag_buf_t 5174734Sab196087 #define Conv_grphdl_flags_buf_t Conv32_grphdl_flags_buf_t 5184734Sab196087 #define Conv_grpdesc_flags_buf_t Conv32_grpdesc_flags_buf_t 5194734Sab196087 #define Conv_seg_flags_buf_t Conv32_seg_flags_buf_t 5204734Sab196087 #define Conv_dyn_posflag1_buf_t Conv32_dyn_posflag1_buf_t 5214734Sab196087 #define Conv_dyn_flag_buf_t Conv32_dyn_flag_buf_t 5224734Sab196087 #define Conv_dyn_flag1_buf_t Conv32_dyn_flag1_buf_t 5234734Sab196087 #define Conv_dyn_feature1_buf_t Conv32_dyn_feature1_buf_t 5244734Sab196087 #define Conv_bnd_type_buf_t Conv32_bnd_type_buf_t 5254734Sab196087 #define Conv_bnd_obj_buf_t Conv32_bnd_obj_buf_t 5264734Sab196087 #define Conv_phdr_flags_buf_t Conv32_phdr_flags_buf_t 5274734Sab196087 #define Conv_sec_flags_buf_t Conv32_sec_flags_buf_t 5284734Sab196087 #define Conv_dwarf_ehe_buf_t Conv32_dwarf_ehe_buf_t 5295088Sab196087 #define Conv_syminfo_flags_buf_t Conv32_syminfo_flags_buf_t 5301618Srie #endif 5311618Srie 5324734Sab196087 5334734Sab196087 5342850Srie 5352850Srie /* 5365088Sab196087 * Many conversion routines accept a fmt_flags argument of this type 5375088Sab196087 * to allow the caller to modify the output. There are two parts to 5385088Sab196087 * this value: 5395088Sab196087 * 5405088Sab196087 * (1) Format requests (decimal vs hex, etc...) 5415088Sab196087 * (2) The low order bits specified by CONV_MASK_FMT_ALT 5425088Sab196087 * and retrieved by CONV_TYPE_FMT_ALT are integer 5435088Sab196087 * values that specify that an alternate set of 5445088Sab196087 * strings should be used. This is necessary because 5455088Sab196087 * different utilities evolved to use different strings, 5465088Sab196087 * and there are backward compatability guarantees in 5475088Sab196087 * place that prevent changing them. 5485088Sab196087 * 5495088Sab196087 * These values are designed such that a caller can always supply a 5505088Sab196087 * simple 0 in order to receive "default" behavior. 5511618Srie */ 5525088Sab196087 typedef int Conv_fmt_flags_t; 5535088Sab196087 5545088Sab196087 /* 5555088Sab196087 * The bottom 8 bits of Conv_fmt_flags_t are used to encode 5565088Sab196087 * alternative strings. 5575088Sab196087 * 5585088Sab196087 * If a given conversion routine does not support alternative strings 5595088Sab196087 * for a given CONV_FMT_ALT type, it silently ignores the request and 5605088Sab196087 * supplies the default set. This means that a utility like dump(1) is 5615088Sab196087 * free to specify its special type in every conversion routine call, 5625088Sab196087 * without regard to whether it has any special meaning for that particular 5635088Sab196087 * routine. It will receive its special strings if there are any, and 5645088Sab196087 * the defaults otherwise. 5655088Sab196087 */ 5665088Sab196087 #define CONV_MASK_FMT_ALT 0xff 5675088Sab196087 #define CONV_TYPE_FMT_ALT(fmt_flags) (fmt_flags & CONV_MASK_FMT_ALT) 5685088Sab196087 5695088Sab196087 #define CONV_FMT_ALT_DEFAULT 0 /* "Standard" strings */ 5705088Sab196087 #define CONV_FMT_ALT_DUMP 1 /* Style of strings used by dump(1) */ 5715088Sab196087 #define CONV_FMT_ALT_FILE 2 /* Style of strings used by file(1) */ 5725088Sab196087 #define CONV_FMT_ALT_CRLE 3 /* Style of strings used by crle(1) */ 5735088Sab196087 #define CONV_FMT_ALT_FULLNAME 4 /* Strings should be full #define */ 5745088Sab196087 /* (e.g. STB_LOCAL, not LOCL) */ 5755088Sab196087 5765088Sab196087 /* 5775088Sab196087 * Flags that alter standard formatting for conversion routines. 5785088Sab196087 * These bits start after the range occupied by CONV_MASK_FMT_ALT. 5795088Sab196087 */ 5805088Sab196087 #define CONV_FMT_DECIMAL 0x0100 /* conv_invalid_val() should print */ 5811976Sab196087 /* integer print as decimal */ 5821976Sab196087 /* (default is hex) */ 5835088Sab196087 #define CONV_FMT_SPACE 0x0200 /* conv_invalid_val() should append */ 5841976Sab196087 /* a space after the number. */ 5855088Sab196087 #define CONV_FMT_NOBKT 0x0400 /* conv_expn_field() should omit */ 5865088Sab196087 /* prefix and suffix strings */ 5871976Sab196087 5881618Srie 5891618Srie /* 5901618Srie * The expansion of bit-field data items is driven from a value descriptor and 5911618Srie * the conv_expn_field() routine. 5921618Srie */ 5931618Srie typedef struct { 5941618Srie Xword v_val; /* expansion value */ 5951618Srie const char *v_msg; /* associated message string */ 5961618Srie } Val_desc; 5971618Srie 5981618Srie /* 5992352Sab196087 * conv_expn_field() is willing to supply default strings for the 6002352Sab196087 * prefix, separator, and suffix arguments, if they are passed as NULL. 6012352Sab196087 * The caller needs to know how much room to allow for these items. 6022352Sab196087 * These values supply those sizes. 6032352Sab196087 */ 6042352Sab196087 #define CONV_EXPN_FIELD_DEF_PREFIX_SIZE 2 /* Default is "[ " */ 6052352Sab196087 #define CONV_EXPN_FIELD_DEF_SEP_SIZE 1 /* Default is " " */ 6062352Sab196087 #define CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 2 /* Default is " ]" */ 6072352Sab196087 6082352Sab196087 /* 6092352Sab196087 * conv_expn_field() requires a large number of inputs, many of which 6102352Sab196087 * can be NULL to accept default behavior. An argument of the following 6112352Sab196087 * type is used to supply them. 6122352Sab196087 */ 6132352Sab196087 typedef struct { 6142352Sab196087 char *buf; /* Buffer to receive generated string */ 6152352Sab196087 size_t bufsize; /* sizeof(buf) */ 6162352Sab196087 const Val_desc *vdp; /* Array of value descriptors, giving the */ 6172352Sab196087 /* possible bit values, and their */ 6182352Sab196087 /* corresponding strings. Note that the */ 6192352Sab196087 /* final element must contain only NULL */ 6202352Sab196087 /* values. This terminates the list. */ 6212352Sab196087 const char **lead_str; /* NULL, or array of pointers to strings to */ 6222352Sab196087 /* be output at the head of the list. */ 6232352Sab196087 /* Last entry must be NULL. */ 6242352Sab196087 Xword oflags; /* Bits for which output strings are desired */ 6252352Sab196087 Xword rflags; /* Bits for which a numeric value should be */ 6262352Sab196087 /* output if vdp does not provide str. */ 6272352Sab196087 /* Must be a proper subset of oflags */ 6282352Sab196087 const char *prefix; /* NULL, or string to prefix output with */ 6292352Sab196087 /* If NULL, "[ " is used. */ 6302352Sab196087 const char *sep; /* NULL, or string to separate output items */ 6312352Sab196087 /* with. If NULL, " " is used. */ 6322352Sab196087 const char *suffix; /* NULL, or string to suffix output with */ 6332352Sab196087 /* If NULL, " ]" is used. */ 6342352Sab196087 } CONV_EXPN_FIELD_ARG; 6352352Sab196087 6362352Sab196087 /* 6371618Srie * Define all generic interfaces. 6380Sstevel@tonic-gate */ 6392647Srie extern uchar_t conv_check_native(char **, char **); 6404734Sab196087 extern const char *conv_config_feat(int, Conv_config_feat_buf_t *); 6414734Sab196087 extern const char *conv_config_obj(ushort_t, Conv_config_obj_buf_t *); 6421618Srie extern const char *conv_config_upm(const char *, const char *, 6431618Srie const char *, size_t); 6444734Sab196087 extern const char *conv_def_tag(Symref, Conv_inv_buf_t *); 6451618Srie extern const char *conv_demangle_name(const char *); 6465088Sab196087 extern const char *conv_dl_flag(int, Conv_fmt_flags_t, 6475088Sab196087 Conv_dl_flag_buf_t *); 6484734Sab196087 extern const char *conv_dl_mode(int, int, Conv_dl_mode_buf_t *); 6494734Sab196087 extern const char *conv_dwarf_ehe(uint_t, Conv_dwarf_ehe_buf_t *); 6504734Sab196087 extern const char *conv_elfdata_type(Elf_Type, Conv_inv_buf_t *); 6514734Sab196087 extern const char *conv_grphdl_flags(uint_t, Conv_grphdl_flags_buf_t *); 6524734Sab196087 extern const char *conv_grpdesc_flags(uint_t, Conv_grpdesc_flags_buf_t *); 6530Sstevel@tonic-gate extern Isa_desc *conv_isalist(void); 6540Sstevel@tonic-gate extern const char *conv_lddstub(int); 6554734Sab196087 extern const char *conv_seg_flags(Half, Conv_seg_flags_buf_t *); 6560Sstevel@tonic-gate extern int conv_sys_eclass(); 6570Sstevel@tonic-gate extern Uts_desc *conv_uts(void); 6581618Srie extern const char *conv_ver_flags(Half); 6594734Sab196087 extern const char *conv_ver_index(Versym, int, Conv_inv_buf_t *); 6604734Sab196087 6611618Srie 6621618Srie /* 6631618Srie * Define all class specific routines. 6641618Srie */ 6651618Srie #if defined(_ELF64) 6661618Srie #define conv_bnd_obj conv64_bnd_obj 6671618Srie #define conv_bnd_type conv64_bnd_type 6681618Srie #define conv_cap_tag conv64_cap_tag 6691618Srie #define conv_cap_val conv64_cap_val 6701618Srie #define conv_cap_val_hw1 conv64_cap_val_hw1 6711618Srie #define conv_cap_val_sf1 conv64_cap_val_sf1 6721618Srie #define conv_dyn_feature1 conv64_dyn_feature1 6731618Srie #define conv_dyn_flag1 conv64_dyn_flag1 6741618Srie #define conv_dyn_flag conv64_dyn_flag 6751618Srie #define conv_dyn_posflag1 conv64_dyn_posflag1 6761618Srie #define conv_dyn_tag conv64_dyn_tag 6771618Srie #define conv_ehdr_class conv64_ehdr_class 6781618Srie #define conv_ehdr_data conv64_ehdr_data 6791618Srie #define conv_ehdr_flags conv64_ehdr_flags 6801618Srie #define conv_ehdr_mach conv64_ehdr_mach 6813850Sab196087 #define conv_ehdr_osabi conv64_ehdr_osabi 6821618Srie #define conv_ehdr_type conv64_ehdr_type 6831618Srie #define conv_ehdr_vers conv64_ehdr_vers 6841618Srie #define conv_expn_field conv64_expn_field 6851618Srie #define conv_invalid_val conv64_invalid_val 6861618Srie #define conv_phdr_flags conv64_phdr_flags 6871618Srie #define conv_phdr_type conv64_phdr_type 6881618Srie #define conv_reject_desc conv64_reject_desc 6891618Srie #define conv_reloc_type conv64_reloc_type 6904734Sab196087 #define conv_reloc_type_static conv64_reloc_type_static 6911618Srie #define conv_reloc_386_type conv64_reloc_386_type 6921618Srie #define conv_reloc_amd64_type conv64_reloc_amd64_type 6931618Srie #define conv_reloc_SPARC_type conv64_reloc_SPARC_type 6941618Srie #define conv_sec_flags conv64_sec_flags 6952647Srie #define conv_sec_linkinfo conv64_sec_linkinfo 6961618Srie #define conv_sec_type conv64_sec_type 6971618Srie #define conv_sym_info_bind conv64_sym_info_bind 6981618Srie #define conv_sym_info_type conv64_sym_info_type 6991618Srie #define conv_sym_shndx conv64_sym_shndx 7001618Srie #define conv_sym_other conv64_sym_other 7015088Sab196087 #define conv_sym_other_vis conv64_sym_other_vis 7021618Srie #define conv_sym_value conv64_sym_value 7031618Srie #define conv_sym_SPARC_value conv64_sym_SPARC_value 7045088Sab196087 #define conv_syminfo_flags conv64_syminfo_flags 7051618Srie #else 7061618Srie #define conv_bnd_obj conv32_bnd_obj 7071618Srie #define conv_bnd_type conv32_bnd_type 7081618Srie #define conv_cap_tag conv32_cap_tag 7091618Srie #define conv_cap_val conv32_cap_val 7101618Srie #define conv_cap_val_hw1 conv32_cap_val_hw1 7111618Srie #define conv_cap_val_sf1 conv32_cap_val_sf1 7121618Srie #define conv_dyn_feature1 conv32_dyn_feature1 7131618Srie #define conv_dyn_flag1 conv32_dyn_flag1 7141618Srie #define conv_dyn_flag conv32_dyn_flag 7151618Srie #define conv_dyn_posflag1 conv32_dyn_posflag1 7161618Srie #define conv_dyn_tag conv32_dyn_tag 7171618Srie #define conv_ehdr_class conv32_ehdr_class 7181618Srie #define conv_ehdr_data conv32_ehdr_data 7191618Srie #define conv_ehdr_flags conv32_ehdr_flags 7201618Srie #define conv_ehdr_mach conv32_ehdr_mach 7213850Sab196087 #define conv_ehdr_osabi conv32_ehdr_osabi 7221618Srie #define conv_ehdr_type conv32_ehdr_type 7231618Srie #define conv_ehdr_vers conv32_ehdr_vers 7241618Srie #define conv_expn_field conv32_expn_field 7251618Srie #define conv_invalid_val conv32_invalid_val 7261618Srie #define conv_phdr_flags conv32_phdr_flags 7271618Srie #define conv_phdr_type conv32_phdr_type 7281618Srie #define conv_reject_desc conv32_reject_desc 7291618Srie #define conv_reloc_type conv32_reloc_type 7304734Sab196087 #define conv_reloc_type_static conv32_reloc_type_static 7311618Srie #define conv_reloc_386_type conv32_reloc_386_type 7321618Srie #define conv_reloc_amd64_type conv32_reloc_amd64_type 7331618Srie #define conv_reloc_SPARC_type conv32_reloc_SPARC_type 7341618Srie #define conv_sec_flags conv32_sec_flags 7352647Srie #define conv_sec_linkinfo conv32_sec_linkinfo 7361618Srie #define conv_sec_type conv32_sec_type 7371618Srie #define conv_sym_info_bind conv32_sym_info_bind 7381618Srie #define conv_sym_info_type conv32_sym_info_type 7391618Srie #define conv_sym_shndx conv32_sym_shndx 7401618Srie #define conv_sym_other conv32_sym_other 7415088Sab196087 #define conv_sym_other_vis conv32_sym_other_vis 7421618Srie #define conv_sym_value conv32_sym_value 7431618Srie #define conv_sym_SPARC_value conv32_sym_SPARC_value 7445088Sab196087 #define conv_syminfo_flags conv32_syminfo_flags 7451618Srie #endif 7461618Srie 7474734Sab196087 extern const char *conv_bnd_obj(uint_t, Conv_bnd_obj_buf_t *); 7484734Sab196087 extern const char *conv_bnd_type(uint_t, Conv_bnd_type_buf_t *); 7494734Sab196087 extern const char *conv_cap_tag(Xword, Conv_inv_buf_t *); 7504734Sab196087 extern const char *conv_cap_val(Xword, Xword, Half, Conv_cap_val_buf_t *); 7515088Sab196087 extern const char *conv_cap_val_hw1(Xword, Half, Conv_fmt_flags_t, 7524734Sab196087 Conv_cap_val_hw1_buf_t *); 7535088Sab196087 extern const char *conv_cap_val_sf1(Xword, Half, Conv_fmt_flags_t, 7544734Sab196087 Conv_cap_val_sf1_buf_t *); 7555088Sab196087 extern const char *conv_dyn_flag1(Xword, Conv_fmt_flags_t, 7565088Sab196087 Conv_dyn_flag1_buf_t *); 7575088Sab196087 extern const char *conv_dyn_flag(Xword, Conv_fmt_flags_t, 7585088Sab196087 Conv_dyn_flag_buf_t *); 7595088Sab196087 extern const char *conv_dyn_posflag1(Xword, Conv_fmt_flags_t, 7604734Sab196087 Conv_dyn_posflag1_buf_t *); 7615088Sab196087 extern const char *conv_dyn_tag(Xword, Half, Conv_fmt_flags_t, 7625088Sab196087 Conv_inv_buf_t *); 7635088Sab196087 extern const char *conv_dyn_feature1(Xword, Conv_fmt_flags_t, 7644734Sab196087 Conv_dyn_feature1_buf_t *); 7655088Sab196087 extern const char *conv_ehdr_class(uchar_t, Conv_fmt_flags_t, 7665088Sab196087 Conv_inv_buf_t *); 7675088Sab196087 extern const char *conv_ehdr_data(uchar_t, Conv_fmt_flags_t, 7685088Sab196087 Conv_inv_buf_t *); 7695088Sab196087 extern const char *conv_ehdr_flags(Half, Word, Conv_fmt_flags_t, 7705088Sab196087 Conv_ehdr_flags_buf_t *); 7715088Sab196087 extern const char *conv_ehdr_mach(Half, Conv_fmt_flags_t, 7725088Sab196087 Conv_inv_buf_t *); 7735088Sab196087 extern const char *conv_ehdr_osabi(uchar_t, Conv_fmt_flags_t, 7745088Sab196087 Conv_inv_buf_t *); 7755088Sab196087 extern const char *conv_ehdr_type(Half, Conv_fmt_flags_t, 7765088Sab196087 Conv_inv_buf_t *); 7775088Sab196087 extern const char *conv_ehdr_vers(Word, Conv_fmt_flags_t, 7785088Sab196087 Conv_inv_buf_t *); 7795088Sab196087 extern int conv_expn_field(CONV_EXPN_FIELD_ARG *, 7805088Sab196087 Conv_fmt_flags_t); 7815088Sab196087 extern const char *conv_invalid_val(Conv_inv_buf_t *, Xword, 7825088Sab196087 Conv_fmt_flags_t); 7835088Sab196087 extern const char *conv_phdr_flags(Word, Conv_fmt_flags_t fmt_flags, 7845088Sab196087 Conv_phdr_flags_buf_t *); 7855088Sab196087 extern const char *conv_phdr_type(Half, Word, Conv_fmt_flags_t, 7865088Sab196087 Conv_inv_buf_t *); 787*6206Sab196087 extern const char *conv_reject_desc(Rej_desc *, Conv_reject_desc_buf_t *, 788*6206Sab196087 Half mach); 7895088Sab196087 extern const char *conv_reloc_type(Half, Word, Conv_fmt_flags_t, 7905088Sab196087 Conv_inv_buf_t *); 7915088Sab196087 extern const char *conv_reloc_type_static(Half, Word, Conv_fmt_flags_t); 7925088Sab196087 extern const char *conv_reloc_386_type(Word, Conv_fmt_flags_t, 7935088Sab196087 Conv_inv_buf_t *); 7945088Sab196087 extern const char *conv_reloc_amd64_type(Word, Conv_fmt_flags_t, 7955088Sab196087 Conv_inv_buf_t *); 7965088Sab196087 extern const char *conv_reloc_SPARC_type(Word, Conv_fmt_flags_t, 7975088Sab196087 Conv_inv_buf_t *); 7985088Sab196087 extern const char *conv_sec_flags(Xword, Conv_fmt_flags_t, 7995088Sab196087 Conv_sec_flags_buf_t *); 8004734Sab196087 extern const char *conv_sec_linkinfo(Word, Xword, Conv_inv_buf_t *); 8015088Sab196087 extern const char *conv_sec_type(Half, Word, Conv_fmt_flags_t, 8025088Sab196087 Conv_inv_buf_t *); 8035088Sab196087 extern const char *conv_sym_info_bind(uchar_t, Conv_fmt_flags_t, 8045088Sab196087 Conv_inv_buf_t *); 8055088Sab196087 extern const char *conv_sym_info_type(Half, uchar_t, Conv_fmt_flags_t, 8064734Sab196087 Conv_inv_buf_t *); 8074734Sab196087 extern const char *conv_sym_shndx(Half, Conv_inv_buf_t *); 8084734Sab196087 extern const char *conv_sym_other(uchar_t, Conv_inv_buf_t *); 8095088Sab196087 extern const char *conv_sym_other_vis(uchar_t, Conv_fmt_flags_t, 8105088Sab196087 Conv_inv_buf_t *); 8114734Sab196087 extern const char *conv_sym_value(Half, uchar_t, Addr, Conv_inv_buf_t *); 8125088Sab196087 extern const char *conv_sym_SPARC_value(Addr, Conv_fmt_flags_t, 8135088Sab196087 Conv_inv_buf_t *); 8145088Sab196087 extern const char *conv_syminfo_flags(Xword flags, Conv_fmt_flags_t, 8155088Sab196087 Conv_syminfo_flags_buf_t *syminfo_flags_buf); 8160Sstevel@tonic-gate 8170Sstevel@tonic-gate #ifdef __cplusplus 8180Sstevel@tonic-gate } 8190Sstevel@tonic-gate #endif 8200Sstevel@tonic-gate 8210Sstevel@tonic-gate #endif /* _CONV_H */ 822