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 * 263731Srie * Copyright 2007 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 #include <machdep.h> 450Sstevel@tonic-gate 460Sstevel@tonic-gate #ifdef __cplusplus 470Sstevel@tonic-gate extern "C" { 480Sstevel@tonic-gate #endif 490Sstevel@tonic-gate 500Sstevel@tonic-gate /* 510Sstevel@tonic-gate * Configuration features available - maintained here (instead of debug.h) 520Sstevel@tonic-gate * to save libconv from having to include debug.h which results in numerous 530Sstevel@tonic-gate * "declared but not used or defined" lint errors. 540Sstevel@tonic-gate */ 550Sstevel@tonic-gate #define CONF_EDLIBPATH 0x000100 /* ELF default library path */ 560Sstevel@tonic-gate #define CONF_ESLIBPATH 0x000200 /* ELF secure library path */ 570Sstevel@tonic-gate #define CONF_ADLIBPATH 0x000400 /* AOUT default library path */ 580Sstevel@tonic-gate #define CONF_ASLIBPATH 0x000800 /* AOUT secure library path */ 590Sstevel@tonic-gate #define CONF_DIRCFG 0x001000 /* directory configuration available */ 600Sstevel@tonic-gate #define CONF_OBJALT 0x002000 /* object alternatives available */ 610Sstevel@tonic-gate #define CONF_MEMRESV 0x004000 /* memory reservation required */ 620Sstevel@tonic-gate #define CONF_ENVS 0x008000 /* environment variables available */ 630Sstevel@tonic-gate #define CONF_FLTR 0x010000 /* filter information available */ 640Sstevel@tonic-gate #define CONF_FEATMSK 0xffff00 650Sstevel@tonic-gate 660Sstevel@tonic-gate /* 674734Sab196087 * Buffer types: 684734Sab196087 * 694734Sab196087 * Many of the routines in this module require the user to supply a 704734Sab196087 * buffer into which the desired strings may be written. These are 714734Sab196087 * all arrays of characters, and might be defined as simple arrays 724734Sab196087 * of char. The problem with that approach is that when such an array 734734Sab196087 * is passed to a function, the C language considers it to have the 744734Sab196087 * type (char *), without any regard to its length. Not all of our 754734Sab196087 * buffers have the same length, and we want to ensure that the compiler 764734Sab196087 * will refuse to compile code that passes the wrong type of buffer to 774734Sab196087 * a given routine. The solution is to define the buffers as unions 784734Sab196087 * that contain the needed array, and then to pass the given union 794734Sab196087 * by address. The compiler will catch attempts to pass the wrong type 804734Sab196087 * of pointer, and the size of a structure/union is implicit in its type. 814734Sab196087 * 824734Sab196087 * A nice side effect of this approach is that we can use a union with 834734Sab196087 * multiple buffers to handle the cases where a given routine needs 844734Sab196087 * more than one type of buffer. The end result is a single buffer large 854734Sab196087 * enough to handle any of the subcases, but no larger. 864734Sab196087 */ 874734Sab196087 884734Sab196087 /* 894734Sab196087 * Size of buffer used by conv_invalid_val(): 904734Sab196087 * 911618Srie * Various values that can't be matched to a symbolic definition are converted 924734Sab196087 * to a numeric string. 934734Sab196087 * 944734Sab196087 * The buffer size reflects the maximum number of digits needed to 954734Sab196087 * display an integer as text, plus a trailing null, and with room for 964734Sab196087 * a leading "0x" if hexidecimal display is selected. 974734Sab196087 */ 984734Sab196087 #define CONV32_INV_BUFSIZE 12 994734Sab196087 typedef union { 1004734Sab196087 char buf[CONV32_INV_BUFSIZE]; 1014734Sab196087 } Conv32_inv_buf_t; 1024734Sab196087 1034734Sab196087 #define CONV64_INV_BUFSIZE 22 1044734Sab196087 typedef union { 1054734Sab196087 char buf[CONV64_INV_BUFSIZE]; 1064734Sab196087 } Conv64_inv_buf_t; 1074734Sab196087 1084734Sab196087 1094734Sab196087 1104734Sab196087 /* conv_ehdr_flags() */ 1115088Sab196087 #define CONV_EHDR_FLAGS_BASE_BUFSIZE 69 1124734Sab196087 #define CONV32_EHDR_FLAGS_BUFSIZE \ 1135088Sab196087 (CONV_EHDR_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 1144734Sab196087 typedef union { 1154734Sab196087 Conv32_inv_buf_t inv_buf; 1164734Sab196087 char buf[CONV32_EHDR_FLAGS_BUFSIZE]; 1174734Sab196087 } Conv32_ehdr_flags_buf_t; 1184734Sab196087 1194734Sab196087 #define CONV64_EHDR_FLAGS_BUFSIZE \ 1205088Sab196087 (CONV_EHDR_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 1214734Sab196087 typedef union { 1224734Sab196087 Conv64_inv_buf_t inv_buf; 1234734Sab196087 char buf[CONV64_EHDR_FLAGS_BUFSIZE]; 1244734Sab196087 } Conv64_ehdr_flags_buf_t; 1254734Sab196087 1264734Sab196087 1274734Sab196087 /* conv_reject_desc() */ 1284734Sab196087 typedef union { 1294734Sab196087 Conv32_inv_buf_t inv_buf; 1304734Sab196087 Conv32_ehdr_flags_buf_t flags_buf; 1314734Sab196087 } Conv32_reject_desc_buf_t; 1324734Sab196087 1334734Sab196087 typedef union { 1344734Sab196087 Conv64_inv_buf_t inv_buf; 1354734Sab196087 Conv64_ehdr_flags_buf_t flags_buf; 1364734Sab196087 } Conv64_reject_desc_buf_t; 1374734Sab196087 1384734Sab196087 1394734Sab196087 /* 1404734Sab196087 * conv_cap_val_hw1() 1414734Sab196087 * 1424734Sab196087 * This size is based on the maximum number of hardware capabilities 1434734Sab196087 * that exist. See common/elfcap. 1444734Sab196087 */ 1454734Sab196087 #define CONV_CAP_VAL_HW1_BUFSIZE 195 1464734Sab196087 1474734Sab196087 typedef union { 1484734Sab196087 Conv32_inv_buf_t inv_buf; 1494734Sab196087 char buf[CONV_CAP_VAL_HW1_BUFSIZE]; 1504734Sab196087 } Conv32_cap_val_hw1_buf_t; 1514734Sab196087 1524734Sab196087 typedef union { 1534734Sab196087 Conv64_inv_buf_t inv_buf; 1544734Sab196087 char buf[CONV_CAP_VAL_HW1_BUFSIZE]; 1554734Sab196087 } Conv64_cap_val_hw1_buf_t; 1564734Sab196087 1574734Sab196087 1584734Sab196087 /* 1594734Sab196087 * conv_cap_val_sf1() 1601618Srie * 1614734Sab196087 * This size is based on the maximum number of software capabilities 1624734Sab196087 * that exist. See common/elfcap. 1634734Sab196087 */ 1644734Sab196087 #define CONV_CAP_VAL_SF1_BUFSIZE 45 1654734Sab196087 1664734Sab196087 typedef union { 1674734Sab196087 Conv32_inv_buf_t inv_buf; 1684734Sab196087 char buf[CONV_CAP_VAL_SF1_BUFSIZE]; 1694734Sab196087 } Conv32_cap_val_sf1_buf_t; 1704734Sab196087 1714734Sab196087 typedef union { 1724734Sab196087 Conv64_inv_buf_t inv_buf; 1734734Sab196087 char buf[CONV_CAP_VAL_SF1_BUFSIZE]; 1744734Sab196087 } Conv64_cap_val_sf1_buf_t; 1754734Sab196087 1764734Sab196087 1774734Sab196087 1784734Sab196087 /* conv_cap_val_buf() */ 1794734Sab196087 typedef union { 1804734Sab196087 Conv32_inv_buf_t inv_buf; 1814734Sab196087 Conv32_cap_val_hw1_buf_t cap_val_hw1_buf; 1824734Sab196087 Conv32_cap_val_sf1_buf_t cap_val_sf1_buf; 1834734Sab196087 } Conv32_cap_val_buf_t; 1844734Sab196087 1854734Sab196087 typedef union { 1864734Sab196087 Conv64_inv_buf_t inv_buf; 1874734Sab196087 Conv64_cap_val_hw1_buf_t cap_val_hw1_buf; 1884734Sab196087 Conv64_cap_val_sf1_buf_t cap_val_sf1_buf; 1894734Sab196087 } Conv64_cap_val_buf_t; 1904734Sab196087 1914734Sab196087 1924734Sab196087 /* conv_config_feat() */ 193*5152Sab196087 #define CONV_CONFIG_FEAT_BUFSIZE 194 1944734Sab196087 1954734Sab196087 typedef union { 1964734Sab196087 Conv32_inv_buf_t inv_buf; 1974734Sab196087 char buf[CONV_CONFIG_FEAT_BUFSIZE]; 1984734Sab196087 } Conv32_config_feat_buf_t; 1994734Sab196087 2004734Sab196087 typedef union { 2014734Sab196087 Conv64_inv_buf_t inv_buf; 2024734Sab196087 char buf[CONV_CONFIG_FEAT_BUFSIZE]; 2034734Sab196087 } Conv64_config_feat_buf_t; 2044734Sab196087 2054734Sab196087 2064734Sab196087 /* conv_config_obj() */ 2074734Sab196087 #define CONV_CONFIG_OBJ_BUFSIZE 154 2084734Sab196087 2094734Sab196087 typedef union { 2104734Sab196087 Conv32_inv_buf_t inv_buf; 2114734Sab196087 char buf[CONV_CONFIG_OBJ_BUFSIZE]; 2124734Sab196087 } Conv32_config_obj_buf_t; 2134734Sab196087 2144734Sab196087 typedef union { 2154734Sab196087 Conv64_inv_buf_t inv_buf; 2164734Sab196087 char buf[CONV_CONFIG_OBJ_BUFSIZE]; 2174734Sab196087 } Conv64_config_obj_buf_t; 2184734Sab196087 2194734Sab196087 2204734Sab196087 /* conv_dl_mode() */ 2214734Sab196087 #define CONV_DL_MODE_BUFSIZE 122 2224734Sab196087 2234734Sab196087 typedef union { 2244734Sab196087 Conv32_inv_buf_t inv_buf; 2254734Sab196087 char buf[CONV_DL_MODE_BUFSIZE]; 2264734Sab196087 } Conv32_dl_mode_buf_t; 2274734Sab196087 2284734Sab196087 typedef union { 2294734Sab196087 Conv64_inv_buf_t inv_buf; 2304734Sab196087 char buf[CONV_DL_MODE_BUFSIZE]; 2314734Sab196087 } Conv64_dl_mode_buf_t; 2324734Sab196087 2334734Sab196087 2344734Sab196087 /* conv_dl_flag() */ 235*5152Sab196087 #define CONV_DL_FLAG_BUFSIZE 175 2364734Sab196087 2374734Sab196087 typedef union { 2384734Sab196087 Conv32_inv_buf_t inv_buf; 2394734Sab196087 char buf[CONV_DL_FLAG_BUFSIZE]; 2404734Sab196087 } Conv32_dl_flag_buf_t; 2414734Sab196087 2424734Sab196087 typedef union { 2434734Sab196087 Conv64_inv_buf_t inv_buf; 2444734Sab196087 char buf[CONV_DL_FLAG_BUFSIZE]; 2454734Sab196087 } Conv64_dl_flag_buf_t; 2464734Sab196087 2474734Sab196087 2484734Sab196087 /* conv_grphdl_flags() */ 2495067Srie #define CONV_GRPHDL_FLAGS_BUFSIZE 82 2504734Sab196087 2514734Sab196087 typedef union { 2524734Sab196087 Conv32_inv_buf_t inv_buf; 2534734Sab196087 char buf[CONV_GRPHDL_FLAGS_BUFSIZE]; 2544734Sab196087 } Conv32_grphdl_flags_buf_t; 2554734Sab196087 2564734Sab196087 typedef union { 2574734Sab196087 Conv64_inv_buf_t inv_buf; 2584734Sab196087 char buf[CONV_GRPHDL_FLAGS_BUFSIZE]; 2594734Sab196087 } Conv64_grphdl_flags_buf_t; 2604734Sab196087 2614734Sab196087 2624734Sab196087 /* conv_grpdesc_flags() */ 2635067Srie #define CONV_GRPDESC_FLAGS_BUFSIZE 92 2644734Sab196087 2654734Sab196087 typedef union { 2664734Sab196087 Conv32_inv_buf_t inv_buf; 2674734Sab196087 char buf[CONV_GRPDESC_FLAGS_BUFSIZE]; 2684734Sab196087 } Conv32_grpdesc_flags_buf_t; 2694734Sab196087 2704734Sab196087 typedef union { 2714734Sab196087 Conv64_inv_buf_t inv_buf; 2724734Sab196087 char buf[CONV_GRPDESC_FLAGS_BUFSIZE]; 2734734Sab196087 } Conv64_grpdesc_flags_buf_t; 2744734Sab196087 2754734Sab196087 2764734Sab196087 /* conv_seg_flags() */ 2774734Sab196087 #define CONV_SEG_FLAGS_BUFSIZE 186 2784734Sab196087 2794734Sab196087 typedef union { 2804734Sab196087 Conv32_inv_buf_t inv_buf; 2814734Sab196087 char buf[CONV_SEG_FLAGS_BUFSIZE]; 2824734Sab196087 } Conv32_seg_flags_buf_t; 2834734Sab196087 2844734Sab196087 typedef union { 2854734Sab196087 Conv64_inv_buf_t inv_buf; 2864734Sab196087 char buf[CONV_SEG_FLAGS_BUFSIZE]; 2874734Sab196087 } Conv64_seg_flags_buf_t; 2884734Sab196087 2894734Sab196087 2904734Sab196087 /* conv_dyn_posflag1() */ 2915088Sab196087 #define CONV_DYN_POSFLAG1_BASE_BUFSIZE 23 2924734Sab196087 #define CONV32_DYN_POSFLAG1_BUFSIZE \ 2935088Sab196087 (CONV_DYN_POSFLAG1_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 2944734Sab196087 typedef union { 2954734Sab196087 Conv32_inv_buf_t inv_buf; 2964734Sab196087 char buf[CONV32_DYN_POSFLAG1_BUFSIZE]; 2974734Sab196087 } Conv32_dyn_posflag1_buf_t; 2984734Sab196087 2994734Sab196087 #define CONV64_DYN_POSFLAG1_BUFSIZE \ 3005088Sab196087 (CONV_DYN_POSFLAG1_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3014734Sab196087 typedef union { 3024734Sab196087 Conv64_inv_buf_t inv_buf; 3034734Sab196087 char buf[CONV64_DYN_POSFLAG1_BUFSIZE]; 3044734Sab196087 } Conv64_dyn_posflag1_buf_t; 3054734Sab196087 3064734Sab196087 3074734Sab196087 /* conv_dyn_flag() */ 3085088Sab196087 #define CONV_DYN_FLAG_BASE_BUFSIZE 48 3094734Sab196087 #define CONV32_DYN_FLAG_BUFSIZE \ 3105088Sab196087 (CONV_DYN_FLAG_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3114734Sab196087 typedef union { 3124734Sab196087 Conv32_inv_buf_t inv_buf; 3134734Sab196087 char buf[CONV32_DYN_FLAG_BUFSIZE]; 3144734Sab196087 } Conv32_dyn_flag_buf_t; 3154734Sab196087 3164734Sab196087 #define CONV64_DYN_FLAG_BUFSIZE \ 3175088Sab196087 (CONV_DYN_FLAG_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3184734Sab196087 typedef union { 3194734Sab196087 Conv64_inv_buf_t inv_buf; 3204734Sab196087 char buf[CONV64_DYN_FLAG_BUFSIZE]; 3214734Sab196087 } Conv64_dyn_flag_buf_t; 3224734Sab196087 3234734Sab196087 3244734Sab196087 /* conv_dyn_flag1() */ 3255088Sab196087 #define CONV_DYN_FLAG1_BASE_BUFSIZE 223 3264734Sab196087 #define CONV32_DYN_FLAG1_BUFSIZE \ 3275088Sab196087 (CONV_DYN_FLAG1_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3284734Sab196087 typedef union { 3294734Sab196087 Conv32_inv_buf_t inv_buf; 3304734Sab196087 char buf[CONV32_DYN_FLAG1_BUFSIZE]; 3314734Sab196087 } Conv32_dyn_flag1_buf_t; 3324734Sab196087 3334734Sab196087 #define CONV64_DYN_FLAG1_BUFSIZE \ 3345088Sab196087 (CONV_DYN_FLAG1_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3354734Sab196087 typedef union { 3364734Sab196087 Conv64_inv_buf_t inv_buf; 3374734Sab196087 char buf[CONV64_DYN_FLAG1_BUFSIZE]; 3384734Sab196087 } Conv64_dyn_flag1_buf_t; 3394734Sab196087 3404734Sab196087 3414734Sab196087 /* conv_dyn_feature1() */ 3425088Sab196087 #define CONV_DYN_FEATURE1_BASE_BUFSIZE 20 3434734Sab196087 #define CONV32_DYN_FEATURE1_BUFSIZE \ 3445088Sab196087 (CONV_DYN_FEATURE1_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3454734Sab196087 typedef union { 3464734Sab196087 Conv32_inv_buf_t inv_buf; 3474734Sab196087 char buf[CONV32_DYN_FEATURE1_BUFSIZE]; 3484734Sab196087 } Conv32_dyn_feature1_buf_t; 3494734Sab196087 3504734Sab196087 #define CONV64_DYN_FEATURE1_BUFSIZE \ 3515088Sab196087 (CONV_DYN_FEATURE1_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3524734Sab196087 typedef union { 3534734Sab196087 Conv64_inv_buf_t inv_buf; 3544734Sab196087 char buf[CONV64_DYN_FEATURE1_BUFSIZE]; 3554734Sab196087 } Conv64_dyn_feature1_buf_t; 3564734Sab196087 3574734Sab196087 3584734Sab196087 /* conv_bnd_type() */ 3595088Sab196087 #define CONV_BND_TYPE_BASE_BUFSIZE 29 3604734Sab196087 #define CONV32_BND_TYPE_BUFSIZE \ 3615088Sab196087 (CONV_BND_TYPE_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3624734Sab196087 typedef union { 3634734Sab196087 Conv32_inv_buf_t inv_buf; 3644734Sab196087 char buf[CONV32_BND_TYPE_BUFSIZE]; 3654734Sab196087 } Conv32_bnd_type_buf_t; 3664734Sab196087 3674734Sab196087 #define CONV64_BND_TYPE_BUFSIZE \ 3685088Sab196087 (CONV_BND_TYPE_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3694734Sab196087 typedef union { 3704734Sab196087 Conv64_inv_buf_t inv_buf; 3714734Sab196087 char buf[CONV64_BND_TYPE_BUFSIZE]; 3724734Sab196087 } Conv64_bnd_type_buf_t; 3734734Sab196087 3744734Sab196087 3754734Sab196087 /* conv_bnd_obj() */ 3765088Sab196087 #define CONV_BND_OBJ_BASE_BUFSIZE 38 3774734Sab196087 #define CONV32_BND_OBJ_BUFSIZE \ 3785088Sab196087 (CONV_BND_OBJ_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3794734Sab196087 typedef union { 3804734Sab196087 Conv32_inv_buf_t inv_buf; 3814734Sab196087 char buf[CONV32_BND_OBJ_BUFSIZE]; 3824734Sab196087 } Conv32_bnd_obj_buf_t; 3834734Sab196087 3844734Sab196087 #define CONV64_BND_OBJ_BUFSIZE \ 3855088Sab196087 (CONV_BND_OBJ_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 3864734Sab196087 typedef union { 3874734Sab196087 Conv64_inv_buf_t inv_buf; 3884734Sab196087 char buf[CONV64_BND_OBJ_BUFSIZE]; 3894734Sab196087 } Conv64_bnd_obj_buf_t; 3904734Sab196087 3914734Sab196087 3924734Sab196087 /* conv_phdr_flags() */ 3935088Sab196087 #define CONV_PHDR_FLAGS_BASE_BUFSIZE 35 3944734Sab196087 #define CONV32_PHDR_FLAGS_BUFSIZE \ 3955088Sab196087 (CONV_PHDR_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 3964734Sab196087 typedef union { 3974734Sab196087 Conv32_inv_buf_t inv_buf; 3984734Sab196087 char buf[CONV32_PHDR_FLAGS_BUFSIZE]; 3994734Sab196087 } Conv32_phdr_flags_buf_t; 4004734Sab196087 4014734Sab196087 #define CONV64_PHDR_FLAGS_BUFSIZE \ 4025088Sab196087 (CONV_PHDR_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 4034734Sab196087 typedef union { 4044734Sab196087 Conv64_inv_buf_t inv_buf; 4054734Sab196087 char buf[CONV64_PHDR_FLAGS_BUFSIZE]; 4064734Sab196087 } Conv64_phdr_flags_buf_t; 4074734Sab196087 4084734Sab196087 4094734Sab196087 /* conv_sec_flags() */ 4105088Sab196087 #define CONV_SEC_FLAGS_BASE_BUFSIZE 168 4114734Sab196087 #define CONV32_SEC_FLAGS_BUFSIZE \ 4125088Sab196087 (CONV_SEC_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 4134734Sab196087 typedef union { 4144734Sab196087 Conv32_inv_buf_t inv_buf; 4154734Sab196087 char buf[CONV32_SEC_FLAGS_BUFSIZE]; 4164734Sab196087 } Conv32_sec_flags_buf_t; 4174734Sab196087 4184734Sab196087 #define CONV64_SEC_FLAGS_BUFSIZE \ 4195088Sab196087 (CONV_SEC_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 4204734Sab196087 typedef union { 4214734Sab196087 Conv64_inv_buf_t inv_buf; 4224734Sab196087 char buf[CONV64_SEC_FLAGS_BUFSIZE]; 4234734Sab196087 } Conv64_sec_flags_buf_t; 4244734Sab196087 4254734Sab196087 4264734Sab196087 /* conv_dwarf_ehe() */ 4274734Sab196087 #define CONV_DWARF_EHE_BUFSIZE 33 4284734Sab196087 typedef union { 4294734Sab196087 Conv32_inv_buf_t inv_buf; 4304734Sab196087 char buf[CONV_DWARF_EHE_BUFSIZE]; 4314734Sab196087 } Conv32_dwarf_ehe_buf_t; 4324734Sab196087 typedef union { 4334734Sab196087 Conv64_inv_buf_t inv_buf; 4344734Sab196087 char buf[CONV_DWARF_EHE_BUFSIZE]; 4354734Sab196087 } Conv64_dwarf_ehe_buf_t; 4364734Sab196087 4374734Sab196087 4385088Sab196087 /* conv_syminfo_flags() */ 4395088Sab196087 #define CONV_SYMINFO_FLAGS_BASE_BUFSIZE 36 4405088Sab196087 #define CONV32_SYMINFO_FLAGS_BUFSIZE \ 4415088Sab196087 (CONV_SYMINFO_FLAGS_BASE_BUFSIZE + CONV32_INV_BUFSIZE) 4425088Sab196087 typedef union { 4435088Sab196087 Conv32_inv_buf_t inv_buf; 4445088Sab196087 char buf[CONV32_SYMINFO_FLAGS_BUFSIZE]; 4455088Sab196087 } Conv32_syminfo_flags_buf_t; 4465088Sab196087 4475088Sab196087 #define CONV64_SYMINFO_FLAGS_BUFSIZE \ 4485088Sab196087 (CONV_SYMINFO_FLAGS_BASE_BUFSIZE + CONV64_INV_BUFSIZE) 4495088Sab196087 typedef union { 4505088Sab196087 Conv64_inv_buf_t inv_buf; 4515088Sab196087 char buf[CONV64_SYMINFO_FLAGS_BUFSIZE]; 4525088Sab196087 } Conv64_syminfo_flags_buf_t; 4535088Sab196087 4545088Sab196087 4554734Sab196087 4564734Sab196087 /* 4574734Sab196087 * Generic names for class specific buffer types above 4581618Srie */ 4591618Srie #if defined(_ELF64) 4604734Sab196087 #define CONV_INV_BUFSIZE CONV64_INV_BUFSIZE 4614734Sab196087 #define CONV_EHDR_FLAGS_BUFSIZE CONV64_EHDR_FLAGS_BUFSIZE 4624734Sab196087 #define CONV_DYN_POSFLAG1_BUFSIZE CONV64_DYN_POSFLAG1_BUFSIZE 4634734Sab196087 #define CONV_DYN_FLAG_BUFSIZE CONV64_DYN_FLAG_BUFSIZE 4644734Sab196087 #define CONV_DYN_FLAG1_BUFSIZE CONV64_DYN_FLAG1_BUFSIZE 4654734Sab196087 #define CONV_DYN_FEATURE1_BUFSIZE CONV64_DYN_FEATURE1_BUFSIZE 4664734Sab196087 #define CONV_BND_TYPE_BUFSIZE CONV64_BND_TYPE_BUFSIZE 4674734Sab196087 #define CONV_BND_OBJ_BUFSIZE CONV64_BND_OBJ_BUFSIZE 4684734Sab196087 #define CONV_PHDR_FLAGS_BUFSIZE CONV64_PHDR_FLAGS_BUFSIZE 4694734Sab196087 #define CONV_SEC_FLAGS_BUFSIZE CONV64_SEC_FLAGS_BUFSIZE 4705088Sab196087 #define CONV_SYMINFO_FLAGS_BUFSIZE CONV64_SYMINFO_FLAGS_BUFSIZE 4714734Sab196087 4724734Sab196087 #define Conv_inv_buf_t Conv64_inv_buf_t 4734734Sab196087 #define Conv_ehdr_flags_buf_t Conv64_ehdr_flags_buf_t 4744734Sab196087 #define Conv_reject_desc_buf_t Conv64_reject_desc_buf_t 4754734Sab196087 #define Conv_cap_val_hw1_buf_t Conv64_cap_val_hw1_buf_t 4764734Sab196087 #define Conv_cap_val_sf1_buf_t Conv64_cap_val_sf1_buf_t 4774734Sab196087 #define Conv_cap_val_buf_t Conv64_cap_val_buf_t 4784734Sab196087 #define Conv_config_feat_buf_t Conv64_config_feat_buf_t 4794734Sab196087 #define Conv_config_obj_buf_t Conv64_config_obj_buf_t 4804734Sab196087 #define Conv_dl_mode_buf_t Conv64_dl_mode_buf_t 4814734Sab196087 #define Conv_dl_flag_buf_t Conv64_dl_flag_buf_t 4824734Sab196087 #define Conv_grphdl_flags_buf_t Conv64_grphdl_flags_buf_t 4834734Sab196087 #define Conv_grpdesc_flags_buf_t Conv64_grpdesc_flags_buf_t 4844734Sab196087 #define Conv_seg_flags_buf_t Conv64_seg_flags_buf_t 4854734Sab196087 #define Conv_dyn_posflag1_buf_t Conv64_dyn_posflag1_buf_t 4864734Sab196087 #define Conv_dyn_flag_buf_t Conv64_dyn_flag_buf_t 4874734Sab196087 #define Conv_dyn_flag1_buf_t Conv64_dyn_flag1_buf_t 4884734Sab196087 #define Conv_dyn_feature1_buf_t Conv64_dyn_feature1_buf_t 4894734Sab196087 #define Conv_bnd_type_buf_t Conv64_bnd_type_buf_t 4904734Sab196087 #define Conv_bnd_obj_buf_t Conv64_bnd_obj_buf_t 4914734Sab196087 #define Conv_phdr_flags_buf_t Conv64_phdr_flags_buf_t 4924734Sab196087 #define Conv_sec_flags_buf_t Conv64_sec_flags_buf_t 4934734Sab196087 #define Conv_dwarf_ehe_buf_t Conv64_dwarf_ehe_buf_t 4945088Sab196087 #define Conv_syminfo_flags_buf_t Conv64_syminfo_flags_buf_t 4951618Srie #else 4964734Sab196087 #define CONV_INV_BUFSIZE CONV32_INV_BUFSIZE 4974734Sab196087 #define CONV_EHDR_FLAGS_BUFSIZE CONV32_EHDR_FLAGS_BUFSIZE 4984734Sab196087 #define CONV_DYN_POSFLAG1_BUFSIZE CONV32_DYN_POSFLAG1_BUFSIZE 4994734Sab196087 #define CONV_DYN_FLAG_BUFSIZE CONV32_DYN_FLAG_BUFSIZE 5004734Sab196087 #define CONV_DYN_FLAG1_BUFSIZE CONV32_DYN_FLAG1_BUFSIZE 5014734Sab196087 #define CONV_DYN_FEATURE1_BUFSIZE CONV32_DYN_FEATURE1_BUFSIZE 5024734Sab196087 #define CONV_BND_TYPE_BUFSIZE CONV32_BND_TYPE_BUFSIZE 5034734Sab196087 #define CONV_BND_OBJ_BUFSIZE CONV32_BND_OBJ_BUFSIZE 5044734Sab196087 #define CONV_PHDR_FLAGS_BUFSIZE CONV32_PHDR_FLAGS_BUFSIZE 5054734Sab196087 #define CONV_SEC_FLAGS_BUFSIZE CONV32_SEC_FLAGS_BUFSIZE 5065088Sab196087 #define CONV_SYMINFO_FLAGS_BUFSIZE CONV32_SYMINFO_FLAGS_BUFSIZE 5074734Sab196087 5084734Sab196087 #define Conv_inv_buf_t Conv32_inv_buf_t 5094734Sab196087 #define Conv_ehdr_flags_buf_t Conv32_ehdr_flags_buf_t 5104734Sab196087 #define Conv_reject_desc_buf_t Conv32_reject_desc_buf_t 5114734Sab196087 #define Conv_cap_val_hw1_buf_t Conv32_cap_val_hw1_buf_t 5124734Sab196087 #define Conv_cap_val_sf1_buf_t Conv32_cap_val_sf1_buf_t 5134734Sab196087 #define Conv_cap_val_buf_t Conv32_cap_val_buf_t 5144734Sab196087 #define Conv_config_feat_buf_t Conv32_config_feat_buf_t 5154734Sab196087 #define Conv_config_obj_buf_t Conv32_config_obj_buf_t 5164734Sab196087 #define Conv_dl_mode_buf_t Conv32_dl_mode_buf_t 5174734Sab196087 #define Conv_dl_flag_buf_t Conv32_dl_flag_buf_t 5184734Sab196087 #define Conv_grphdl_flags_buf_t Conv32_grphdl_flags_buf_t 5194734Sab196087 #define Conv_grpdesc_flags_buf_t Conv32_grpdesc_flags_buf_t 5204734Sab196087 #define Conv_seg_flags_buf_t Conv32_seg_flags_buf_t 5214734Sab196087 #define Conv_dyn_posflag1_buf_t Conv32_dyn_posflag1_buf_t 5224734Sab196087 #define Conv_dyn_flag_buf_t Conv32_dyn_flag_buf_t 5234734Sab196087 #define Conv_dyn_flag1_buf_t Conv32_dyn_flag1_buf_t 5244734Sab196087 #define Conv_dyn_feature1_buf_t Conv32_dyn_feature1_buf_t 5254734Sab196087 #define Conv_bnd_type_buf_t Conv32_bnd_type_buf_t 5264734Sab196087 #define Conv_bnd_obj_buf_t Conv32_bnd_obj_buf_t 5274734Sab196087 #define Conv_phdr_flags_buf_t Conv32_phdr_flags_buf_t 5284734Sab196087 #define Conv_sec_flags_buf_t Conv32_sec_flags_buf_t 5294734Sab196087 #define Conv_dwarf_ehe_buf_t Conv32_dwarf_ehe_buf_t 5305088Sab196087 #define Conv_syminfo_flags_buf_t Conv32_syminfo_flags_buf_t 5311618Srie #endif 5321618Srie 5334734Sab196087 5344734Sab196087 5352850Srie 5362850Srie /* 5375088Sab196087 * Many conversion routines accept a fmt_flags argument of this type 5385088Sab196087 * to allow the caller to modify the output. There are two parts to 5395088Sab196087 * this value: 5405088Sab196087 * 5415088Sab196087 * (1) Format requests (decimal vs hex, etc...) 5425088Sab196087 * (2) The low order bits specified by CONV_MASK_FMT_ALT 5435088Sab196087 * and retrieved by CONV_TYPE_FMT_ALT are integer 5445088Sab196087 * values that specify that an alternate set of 5455088Sab196087 * strings should be used. This is necessary because 5465088Sab196087 * different utilities evolved to use different strings, 5475088Sab196087 * and there are backward compatability guarantees in 5485088Sab196087 * place that prevent changing them. 5495088Sab196087 * 5505088Sab196087 * These values are designed such that a caller can always supply a 5515088Sab196087 * simple 0 in order to receive "default" behavior. 5521618Srie */ 5535088Sab196087 typedef int Conv_fmt_flags_t; 5545088Sab196087 5555088Sab196087 /* 5565088Sab196087 * The bottom 8 bits of Conv_fmt_flags_t are used to encode 5575088Sab196087 * alternative strings. 5585088Sab196087 * 5595088Sab196087 * If a given conversion routine does not support alternative strings 5605088Sab196087 * for a given CONV_FMT_ALT type, it silently ignores the request and 5615088Sab196087 * supplies the default set. This means that a utility like dump(1) is 5625088Sab196087 * free to specify its special type in every conversion routine call, 5635088Sab196087 * without regard to whether it has any special meaning for that particular 5645088Sab196087 * routine. It will receive its special strings if there are any, and 5655088Sab196087 * the defaults otherwise. 5665088Sab196087 */ 5675088Sab196087 #define CONV_MASK_FMT_ALT 0xff 5685088Sab196087 #define CONV_TYPE_FMT_ALT(fmt_flags) (fmt_flags & CONV_MASK_FMT_ALT) 5695088Sab196087 5705088Sab196087 #define CONV_FMT_ALT_DEFAULT 0 /* "Standard" strings */ 5715088Sab196087 #define CONV_FMT_ALT_DUMP 1 /* Style of strings used by dump(1) */ 5725088Sab196087 #define CONV_FMT_ALT_FILE 2 /* Style of strings used by file(1) */ 5735088Sab196087 #define CONV_FMT_ALT_CRLE 3 /* Style of strings used by crle(1) */ 5745088Sab196087 #define CONV_FMT_ALT_FULLNAME 4 /* Strings should be full #define */ 5755088Sab196087 /* (e.g. STB_LOCAL, not LOCL) */ 5765088Sab196087 5775088Sab196087 /* 5785088Sab196087 * Flags that alter standard formatting for conversion routines. 5795088Sab196087 * These bits start after the range occupied by CONV_MASK_FMT_ALT. 5805088Sab196087 */ 5815088Sab196087 #define CONV_FMT_DECIMAL 0x0100 /* conv_invalid_val() should print */ 5821976Sab196087 /* integer print as decimal */ 5831976Sab196087 /* (default is hex) */ 5845088Sab196087 #define CONV_FMT_SPACE 0x0200 /* conv_invalid_val() should append */ 5851976Sab196087 /* a space after the number. */ 5865088Sab196087 #define CONV_FMT_NOBKT 0x0400 /* conv_expn_field() should omit */ 5875088Sab196087 /* prefix and suffix strings */ 5881976Sab196087 5891618Srie 5901618Srie /* 5911618Srie * The expansion of bit-field data items is driven from a value descriptor and 5921618Srie * the conv_expn_field() routine. 5931618Srie */ 5941618Srie typedef struct { 5951618Srie Xword v_val; /* expansion value */ 5961618Srie const char *v_msg; /* associated message string */ 5971618Srie } Val_desc; 5981618Srie 5991618Srie /* 6002352Sab196087 * conv_expn_field() is willing to supply default strings for the 6012352Sab196087 * prefix, separator, and suffix arguments, if they are passed as NULL. 6022352Sab196087 * The caller needs to know how much room to allow for these items. 6032352Sab196087 * These values supply those sizes. 6042352Sab196087 */ 6052352Sab196087 #define CONV_EXPN_FIELD_DEF_PREFIX_SIZE 2 /* Default is "[ " */ 6062352Sab196087 #define CONV_EXPN_FIELD_DEF_SEP_SIZE 1 /* Default is " " */ 6072352Sab196087 #define CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 2 /* Default is " ]" */ 6082352Sab196087 6092352Sab196087 /* 6102352Sab196087 * conv_expn_field() requires a large number of inputs, many of which 6112352Sab196087 * can be NULL to accept default behavior. An argument of the following 6122352Sab196087 * type is used to supply them. 6132352Sab196087 */ 6142352Sab196087 typedef struct { 6152352Sab196087 char *buf; /* Buffer to receive generated string */ 6162352Sab196087 size_t bufsize; /* sizeof(buf) */ 6172352Sab196087 const Val_desc *vdp; /* Array of value descriptors, giving the */ 6182352Sab196087 /* possible bit values, and their */ 6192352Sab196087 /* corresponding strings. Note that the */ 6202352Sab196087 /* final element must contain only NULL */ 6212352Sab196087 /* values. This terminates the list. */ 6222352Sab196087 const char **lead_str; /* NULL, or array of pointers to strings to */ 6232352Sab196087 /* be output at the head of the list. */ 6242352Sab196087 /* Last entry must be NULL. */ 6252352Sab196087 Xword oflags; /* Bits for which output strings are desired */ 6262352Sab196087 Xword rflags; /* Bits for which a numeric value should be */ 6272352Sab196087 /* output if vdp does not provide str. */ 6282352Sab196087 /* Must be a proper subset of oflags */ 6292352Sab196087 const char *prefix; /* NULL, or string to prefix output with */ 6302352Sab196087 /* If NULL, "[ " is used. */ 6312352Sab196087 const char *sep; /* NULL, or string to separate output items */ 6322352Sab196087 /* with. If NULL, " " is used. */ 6332352Sab196087 const char *suffix; /* NULL, or string to suffix output with */ 6342352Sab196087 /* If NULL, " ]" is used. */ 6352352Sab196087 } CONV_EXPN_FIELD_ARG; 6362352Sab196087 6372352Sab196087 /* 6381618Srie * Define all generic interfaces. 6390Sstevel@tonic-gate */ 6402647Srie extern uchar_t conv_check_native(char **, char **); 6414734Sab196087 extern const char *conv_config_feat(int, Conv_config_feat_buf_t *); 6424734Sab196087 extern const char *conv_config_obj(ushort_t, Conv_config_obj_buf_t *); 6431618Srie extern const char *conv_config_upm(const char *, const char *, 6441618Srie const char *, size_t); 6454734Sab196087 extern const char *conv_def_tag(Symref, Conv_inv_buf_t *); 6461618Srie extern const char *conv_demangle_name(const char *); 6475088Sab196087 extern const char *conv_dl_flag(int, Conv_fmt_flags_t, 6485088Sab196087 Conv_dl_flag_buf_t *); 6494734Sab196087 extern const char *conv_dl_mode(int, int, Conv_dl_mode_buf_t *); 6504734Sab196087 extern const char *conv_dwarf_ehe(uint_t, Conv_dwarf_ehe_buf_t *); 6514734Sab196087 extern const char *conv_elfdata_type(Elf_Type, Conv_inv_buf_t *); 6524734Sab196087 extern const char *conv_grphdl_flags(uint_t, Conv_grphdl_flags_buf_t *); 6534734Sab196087 extern const char *conv_grpdesc_flags(uint_t, Conv_grpdesc_flags_buf_t *); 6540Sstevel@tonic-gate extern Isa_desc *conv_isalist(void); 6550Sstevel@tonic-gate extern const char *conv_lddstub(int); 6564734Sab196087 extern const char *conv_seg_flags(Half, Conv_seg_flags_buf_t *); 6570Sstevel@tonic-gate extern int conv_sys_eclass(); 6580Sstevel@tonic-gate extern Uts_desc *conv_uts(void); 6591618Srie extern const char *conv_ver_flags(Half); 6604734Sab196087 extern const char *conv_ver_index(Versym, int, Conv_inv_buf_t *); 6614734Sab196087 6621618Srie 6631618Srie /* 6641618Srie * Define all class specific routines. 6651618Srie */ 6661618Srie #if defined(_ELF64) 6671618Srie #define conv_bnd_obj conv64_bnd_obj 6681618Srie #define conv_bnd_type conv64_bnd_type 6691618Srie #define conv_cap_tag conv64_cap_tag 6701618Srie #define conv_cap_val conv64_cap_val 6711618Srie #define conv_cap_val_hw1 conv64_cap_val_hw1 6721618Srie #define conv_cap_val_sf1 conv64_cap_val_sf1 6731618Srie #define conv_dyn_feature1 conv64_dyn_feature1 6741618Srie #define conv_dyn_flag1 conv64_dyn_flag1 6751618Srie #define conv_dyn_flag conv64_dyn_flag 6761618Srie #define conv_dyn_posflag1 conv64_dyn_posflag1 6771618Srie #define conv_dyn_tag conv64_dyn_tag 6781618Srie #define conv_ehdr_class conv64_ehdr_class 6791618Srie #define conv_ehdr_data conv64_ehdr_data 6801618Srie #define conv_ehdr_flags conv64_ehdr_flags 6811618Srie #define conv_ehdr_mach conv64_ehdr_mach 6823850Sab196087 #define conv_ehdr_osabi conv64_ehdr_osabi 6831618Srie #define conv_ehdr_type conv64_ehdr_type 6841618Srie #define conv_ehdr_vers conv64_ehdr_vers 6851618Srie #define conv_expn_field conv64_expn_field 6861618Srie #define conv_invalid_val conv64_invalid_val 6871618Srie #define conv_phdr_flags conv64_phdr_flags 6881618Srie #define conv_phdr_type conv64_phdr_type 6891618Srie #define conv_reject_desc conv64_reject_desc 6901618Srie #define conv_reloc_type conv64_reloc_type 6914734Sab196087 #define conv_reloc_type_static conv64_reloc_type_static 6921618Srie #define conv_reloc_386_type conv64_reloc_386_type 6931618Srie #define conv_reloc_amd64_type conv64_reloc_amd64_type 6941618Srie #define conv_reloc_SPARC_type conv64_reloc_SPARC_type 6951618Srie #define conv_sec_flags conv64_sec_flags 6962647Srie #define conv_sec_linkinfo conv64_sec_linkinfo 6971618Srie #define conv_sec_type conv64_sec_type 6981618Srie #define conv_sym_info_bind conv64_sym_info_bind 6991618Srie #define conv_sym_info_type conv64_sym_info_type 7001618Srie #define conv_sym_shndx conv64_sym_shndx 7011618Srie #define conv_sym_other conv64_sym_other 7025088Sab196087 #define conv_sym_other_vis conv64_sym_other_vis 7031618Srie #define conv_sym_value conv64_sym_value 7041618Srie #define conv_sym_SPARC_value conv64_sym_SPARC_value 7055088Sab196087 #define conv_syminfo_flags conv64_syminfo_flags 7061618Srie #else 7071618Srie #define conv_bnd_obj conv32_bnd_obj 7081618Srie #define conv_bnd_type conv32_bnd_type 7091618Srie #define conv_cap_tag conv32_cap_tag 7101618Srie #define conv_cap_val conv32_cap_val 7111618Srie #define conv_cap_val_hw1 conv32_cap_val_hw1 7121618Srie #define conv_cap_val_sf1 conv32_cap_val_sf1 7131618Srie #define conv_dyn_feature1 conv32_dyn_feature1 7141618Srie #define conv_dyn_flag1 conv32_dyn_flag1 7151618Srie #define conv_dyn_flag conv32_dyn_flag 7161618Srie #define conv_dyn_posflag1 conv32_dyn_posflag1 7171618Srie #define conv_dyn_tag conv32_dyn_tag 7181618Srie #define conv_ehdr_class conv32_ehdr_class 7191618Srie #define conv_ehdr_data conv32_ehdr_data 7201618Srie #define conv_ehdr_flags conv32_ehdr_flags 7211618Srie #define conv_ehdr_mach conv32_ehdr_mach 7223850Sab196087 #define conv_ehdr_osabi conv32_ehdr_osabi 7231618Srie #define conv_ehdr_type conv32_ehdr_type 7241618Srie #define conv_ehdr_vers conv32_ehdr_vers 7251618Srie #define conv_expn_field conv32_expn_field 7261618Srie #define conv_invalid_val conv32_invalid_val 7271618Srie #define conv_phdr_flags conv32_phdr_flags 7281618Srie #define conv_phdr_type conv32_phdr_type 7291618Srie #define conv_reject_desc conv32_reject_desc 7301618Srie #define conv_reloc_type conv32_reloc_type 7314734Sab196087 #define conv_reloc_type_static conv32_reloc_type_static 7321618Srie #define conv_reloc_386_type conv32_reloc_386_type 7331618Srie #define conv_reloc_amd64_type conv32_reloc_amd64_type 7341618Srie #define conv_reloc_SPARC_type conv32_reloc_SPARC_type 7351618Srie #define conv_sec_flags conv32_sec_flags 7362647Srie #define conv_sec_linkinfo conv32_sec_linkinfo 7371618Srie #define conv_sec_type conv32_sec_type 7381618Srie #define conv_sym_info_bind conv32_sym_info_bind 7391618Srie #define conv_sym_info_type conv32_sym_info_type 7401618Srie #define conv_sym_shndx conv32_sym_shndx 7411618Srie #define conv_sym_other conv32_sym_other 7425088Sab196087 #define conv_sym_other_vis conv32_sym_other_vis 7431618Srie #define conv_sym_value conv32_sym_value 7441618Srie #define conv_sym_SPARC_value conv32_sym_SPARC_value 7455088Sab196087 #define conv_syminfo_flags conv32_syminfo_flags 7461618Srie #endif 7471618Srie 7484734Sab196087 extern const char *conv_bnd_obj(uint_t, Conv_bnd_obj_buf_t *); 7494734Sab196087 extern const char *conv_bnd_type(uint_t, Conv_bnd_type_buf_t *); 7504734Sab196087 extern const char *conv_cap_tag(Xword, Conv_inv_buf_t *); 7514734Sab196087 extern const char *conv_cap_val(Xword, Xword, Half, Conv_cap_val_buf_t *); 7525088Sab196087 extern const char *conv_cap_val_hw1(Xword, Half, Conv_fmt_flags_t, 7534734Sab196087 Conv_cap_val_hw1_buf_t *); 7545088Sab196087 extern const char *conv_cap_val_sf1(Xword, Half, Conv_fmt_flags_t, 7554734Sab196087 Conv_cap_val_sf1_buf_t *); 7565088Sab196087 extern const char *conv_dyn_flag1(Xword, Conv_fmt_flags_t, 7575088Sab196087 Conv_dyn_flag1_buf_t *); 7585088Sab196087 extern const char *conv_dyn_flag(Xword, Conv_fmt_flags_t, 7595088Sab196087 Conv_dyn_flag_buf_t *); 7605088Sab196087 extern const char *conv_dyn_posflag1(Xword, Conv_fmt_flags_t, 7614734Sab196087 Conv_dyn_posflag1_buf_t *); 7625088Sab196087 extern const char *conv_dyn_tag(Xword, Half, Conv_fmt_flags_t, 7635088Sab196087 Conv_inv_buf_t *); 7645088Sab196087 extern const char *conv_dyn_feature1(Xword, Conv_fmt_flags_t, 7654734Sab196087 Conv_dyn_feature1_buf_t *); 7665088Sab196087 extern const char *conv_ehdr_class(uchar_t, Conv_fmt_flags_t, 7675088Sab196087 Conv_inv_buf_t *); 7685088Sab196087 extern const char *conv_ehdr_data(uchar_t, Conv_fmt_flags_t, 7695088Sab196087 Conv_inv_buf_t *); 7705088Sab196087 extern const char *conv_ehdr_flags(Half, Word, Conv_fmt_flags_t, 7715088Sab196087 Conv_ehdr_flags_buf_t *); 7725088Sab196087 extern const char *conv_ehdr_mach(Half, Conv_fmt_flags_t, 7735088Sab196087 Conv_inv_buf_t *); 7745088Sab196087 extern const char *conv_ehdr_osabi(uchar_t, Conv_fmt_flags_t, 7755088Sab196087 Conv_inv_buf_t *); 7765088Sab196087 extern const char *conv_ehdr_type(Half, Conv_fmt_flags_t, 7775088Sab196087 Conv_inv_buf_t *); 7785088Sab196087 extern const char *conv_ehdr_vers(Word, Conv_fmt_flags_t, 7795088Sab196087 Conv_inv_buf_t *); 7805088Sab196087 extern int conv_expn_field(CONV_EXPN_FIELD_ARG *, 7815088Sab196087 Conv_fmt_flags_t); 7825088Sab196087 extern const char *conv_invalid_val(Conv_inv_buf_t *, Xword, 7835088Sab196087 Conv_fmt_flags_t); 7845088Sab196087 extern const char *conv_phdr_flags(Word, Conv_fmt_flags_t fmt_flags, 7855088Sab196087 Conv_phdr_flags_buf_t *); 7865088Sab196087 extern const char *conv_phdr_type(Half, Word, Conv_fmt_flags_t, 7875088Sab196087 Conv_inv_buf_t *); 7884734Sab196087 extern const char *conv_reject_desc(Rej_desc *, Conv_reject_desc_buf_t *); 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