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 /* 23*11827SRod.Evans@Sun.COM * Copyright 2010 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate /* 280Sstevel@tonic-gate * String conversion routine for .dynamic tag entries. 290Sstevel@tonic-gate */ 300Sstevel@tonic-gate #include <stdio.h> 310Sstevel@tonic-gate #include <string.h> 320Sstevel@tonic-gate #include <sys/elf_SPARC.h> 33280Srie #include "rtld.h" 340Sstevel@tonic-gate #include "_conv.h" 350Sstevel@tonic-gate #include "dynamic_msg.h" 360Sstevel@tonic-gate 373492Sab196087 383492Sab196087 399273SAli.Bahrami@Sun.COM const Val_desc * 409273SAli.Bahrami@Sun.COM conv_dyn_posflag1_strings(Conv_fmt_flags_t fmt_flags) 419273SAli.Bahrami@Sun.COM { 422352Sab196087 #define POSSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \ 439273SAli.Bahrami@Sun.COM MSG_DF_P1_LAZYLOAD_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 449273SAli.Bahrami@Sun.COM MSG_DF_P1_GROUPPERM_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 459273SAli.Bahrami@Sun.COM CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 464734Sab196087 479273SAli.Bahrami@Sun.COM /* 489273SAli.Bahrami@Sun.COM * Ensure that Conv_dyn_posflag1_buf_t is large enough: 499273SAli.Bahrami@Sun.COM * 509273SAli.Bahrami@Sun.COM * POSSZ is the real minimum size of the buffer required by 519273SAli.Bahrami@Sun.COM * conv_dyn_posflag1(). However, Conv_dyn_posflag1_buf_t uses 529273SAli.Bahrami@Sun.COM * CONV_DYN_POSFLAG1_BUFSIZE to set the buffer size. We do things 539273SAli.Bahrami@Sun.COM * this way because the definition of POSSZ uses 549273SAli.Bahrami@Sun.COM * information that is not available in the environment of other 559273SAli.Bahrami@Sun.COM * programs that include the conv.h header file. 569273SAli.Bahrami@Sun.COM */ 575152Sab196087 #if (CONV_DYN_POSFLAG1_BUFSIZE != POSSZ) && !defined(__lint) 585152Sab196087 #define REPORT_BUFSIZE POSSZ 595152Sab196087 #include "report_bufsize.h" 605152Sab196087 #error "CONV_DYN_POSFLAG1_BUFSIZE does not match POSSZ" 614734Sab196087 #endif 620Sstevel@tonic-gate 639273SAli.Bahrami@Sun.COM static const Val_desc vda_def[] = { 649273SAli.Bahrami@Sun.COM { DF_P1_LAZYLOAD, MSG_DF_P1_LAZYLOAD_DEF }, 659273SAli.Bahrami@Sun.COM { DF_P1_GROUPPERM, MSG_DF_P1_GROUPPERM_CFNP }, 661618Srie { 0, 0 } 671618Srie }; 689273SAli.Bahrami@Sun.COM static const Val_desc vda_cf[] = { 699273SAli.Bahrami@Sun.COM { DF_P1_LAZYLOAD, MSG_DF_P1_LAZYLOAD_CF }, 709273SAli.Bahrami@Sun.COM { DF_P1_GROUPPERM, MSG_DF_P1_GROUPPERM_CF }, 719273SAli.Bahrami@Sun.COM { 0, 0 } 729273SAli.Bahrami@Sun.COM }; 739273SAli.Bahrami@Sun.COM static const Val_desc vda_cfnp[] = { 749273SAli.Bahrami@Sun.COM { DF_P1_LAZYLOAD, MSG_DF_P1_LAZYLOAD_CFNP }, 759273SAli.Bahrami@Sun.COM { DF_P1_GROUPPERM, MSG_DF_P1_GROUPPERM_CFNP }, 769273SAli.Bahrami@Sun.COM { 0, 0 } 779273SAli.Bahrami@Sun.COM }; 789273SAli.Bahrami@Sun.COM static const Val_desc vda_nf[] = { 799273SAli.Bahrami@Sun.COM { DF_P1_LAZYLOAD, MSG_DF_P1_LAZYLOAD_NF }, 809273SAli.Bahrami@Sun.COM { DF_P1_GROUPPERM, MSG_DF_P1_GROUPPERM_NF }, 812352Sab196087 { 0, 0 } 822352Sab196087 }; 831618Srie 849273SAli.Bahrami@Sun.COM switch (CONV_TYPE_FMT_ALT(fmt_flags)) { 859273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_DUMP: 869273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_CFNP: 879273SAli.Bahrami@Sun.COM return (vda_cfnp); 889273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_CF: 899273SAli.Bahrami@Sun.COM return (vda_cf); 909273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_NF: 919273SAli.Bahrami@Sun.COM return (vda_nf); 929273SAli.Bahrami@Sun.COM } 930Sstevel@tonic-gate 949273SAli.Bahrami@Sun.COM return (vda_def); 959273SAli.Bahrami@Sun.COM } 960Sstevel@tonic-gate 979273SAli.Bahrami@Sun.COM conv_iter_ret_t 989273SAli.Bahrami@Sun.COM conv_iter_dyn_posflag1(Conv_fmt_flags_t fmt_flags, conv_iter_cb_t func, 999273SAli.Bahrami@Sun.COM void *uvalue) 1009273SAli.Bahrami@Sun.COM { 1019273SAli.Bahrami@Sun.COM return (conv_iter_vd(conv_dyn_posflag1_strings(fmt_flags), 1029273SAli.Bahrami@Sun.COM func, uvalue)); 1030Sstevel@tonic-gate } 1040Sstevel@tonic-gate 1059273SAli.Bahrami@Sun.COM const Val_desc * 1069273SAli.Bahrami@Sun.COM conv_dyn_flag_strings(Conv_fmt_flags_t fmt_flags) 1079273SAli.Bahrami@Sun.COM { 1082352Sab196087 #define FLAGSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \ 1099273SAli.Bahrami@Sun.COM MSG_DF_ORIGIN_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1109273SAli.Bahrami@Sun.COM MSG_DF_SYMBOLIC_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1119273SAli.Bahrami@Sun.COM MSG_DF_TEXTREL_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1129273SAli.Bahrami@Sun.COM MSG_DF_BIND_NOW_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1139273SAli.Bahrami@Sun.COM MSG_DF_STATIC_TLS_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1149273SAli.Bahrami@Sun.COM CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 1154734Sab196087 1169273SAli.Bahrami@Sun.COM /* 1179273SAli.Bahrami@Sun.COM * Ensure that Conv_dyn_flag_buf_t is large enough: 1189273SAli.Bahrami@Sun.COM * 1199273SAli.Bahrami@Sun.COM * FLAGSZ is the real minimum size of the buffer required by 1209273SAli.Bahrami@Sun.COM * conv_dyn_flag(). However, Conv_dyn_flag_buf_t uses 1219273SAli.Bahrami@Sun.COM * CONV_DYN_FLAG_BUFSIZE to set the buffer size. We do things this 1229273SAli.Bahrami@Sun.COM * way because the definition of FLAGSZ uses information that is not 1239273SAli.Bahrami@Sun.COM * available in the environment of other programs that include the 1249273SAli.Bahrami@Sun.COM * conv.h header file. 1259273SAli.Bahrami@Sun.COM */ 1265152Sab196087 #if (CONV_DYN_FLAG_BUFSIZE != FLAGSZ) && !defined(__lint) 1275152Sab196087 #define REPORT_BUFSIZE FLAGSZ 1285152Sab196087 #include "report_bufsize.h" 1295152Sab196087 #error "CONV_DYN_FLAG_BUFSIZE does not match FLAGSZ" 1304734Sab196087 #endif 1319273SAli.Bahrami@Sun.COM 1329273SAli.Bahrami@Sun.COM static const Val_desc vda_cf[] = { 1339273SAli.Bahrami@Sun.COM { DF_ORIGIN, MSG_DF_ORIGIN_CF }, 1349273SAli.Bahrami@Sun.COM { DF_SYMBOLIC, MSG_DF_SYMBOLIC_CF }, 1359273SAli.Bahrami@Sun.COM { DF_TEXTREL, MSG_DF_TEXTREL_CF }, 1369273SAli.Bahrami@Sun.COM { DF_BIND_NOW, MSG_DF_BIND_NOW_CF }, 1379273SAli.Bahrami@Sun.COM { DF_STATIC_TLS, MSG_DF_STATIC_TLS_CF }, 1389273SAli.Bahrami@Sun.COM { 0 } 1399273SAli.Bahrami@Sun.COM }; 1409273SAli.Bahrami@Sun.COM static const Val_desc vda_cfnp[] = { 1419273SAli.Bahrami@Sun.COM { DF_ORIGIN, MSG_DF_ORIGIN_CFNP }, 1429273SAli.Bahrami@Sun.COM { DF_SYMBOLIC, MSG_DF_SYMBOLIC_CFNP }, 1439273SAli.Bahrami@Sun.COM { DF_TEXTREL, MSG_DF_TEXTREL_CFNP }, 1449273SAli.Bahrami@Sun.COM { DF_BIND_NOW, MSG_DF_BIND_NOW_CFNP }, 1459273SAli.Bahrami@Sun.COM { DF_STATIC_TLS, MSG_DF_STATIC_TLS_CFNP }, 1469273SAli.Bahrami@Sun.COM { 0 } 1471618Srie }; 1489273SAli.Bahrami@Sun.COM static const Val_desc vda_nf[] = { 1499273SAli.Bahrami@Sun.COM { DF_ORIGIN, MSG_DF_ORIGIN_NF }, 1509273SAli.Bahrami@Sun.COM { DF_SYMBOLIC, MSG_DF_SYMBOLIC_NF }, 1519273SAli.Bahrami@Sun.COM { DF_TEXTREL, MSG_DF_TEXTREL_NF }, 1529273SAli.Bahrami@Sun.COM { DF_BIND_NOW, MSG_DF_BIND_NOW_NF }, 1539273SAli.Bahrami@Sun.COM { DF_STATIC_TLS, MSG_DF_STATIC_TLS_NF }, 1549273SAli.Bahrami@Sun.COM { 0 } 1559273SAli.Bahrami@Sun.COM }; 1560Sstevel@tonic-gate 1579273SAli.Bahrami@Sun.COM switch (CONV_TYPE_FMT_ALT(fmt_flags)) { 1589273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_CF: 1599273SAli.Bahrami@Sun.COM return (vda_cf); 1609273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_NF: 1619273SAli.Bahrami@Sun.COM return (vda_nf); 1622352Sab196087 } 1630Sstevel@tonic-gate 1649273SAli.Bahrami@Sun.COM return (vda_cfnp); 1650Sstevel@tonic-gate } 1660Sstevel@tonic-gate 1679273SAli.Bahrami@Sun.COM conv_iter_ret_t 1689273SAli.Bahrami@Sun.COM conv_iter_dyn_flag(Conv_fmt_flags_t fmt_flags, conv_iter_cb_t func, 1699273SAli.Bahrami@Sun.COM void *uvalue) 1709273SAli.Bahrami@Sun.COM { 1719273SAli.Bahrami@Sun.COM return (conv_iter_vd(conv_dyn_flag_strings(fmt_flags), func, uvalue)); 1729273SAli.Bahrami@Sun.COM } 1739273SAli.Bahrami@Sun.COM 1749273SAli.Bahrami@Sun.COM const Val_desc * 1759273SAli.Bahrami@Sun.COM conv_dyn_flag1_strings(Conv_fmt_flags_t fmt_flags) 1769273SAli.Bahrami@Sun.COM { 1772352Sab196087 #define FLAG1SZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \ 1789273SAli.Bahrami@Sun.COM MSG_DF_1_NOW_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1799273SAli.Bahrami@Sun.COM MSG_DF_1_GLOBAL_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1809273SAli.Bahrami@Sun.COM MSG_DF_1_GROUP_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1819273SAli.Bahrami@Sun.COM MSG_DF_1_NODELETE_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1829273SAli.Bahrami@Sun.COM MSG_DF_1_LOADFLTR_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1839273SAli.Bahrami@Sun.COM MSG_DF_1_INITFIRST_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1849273SAli.Bahrami@Sun.COM MSG_DF_1_NOOPEN_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1859273SAli.Bahrami@Sun.COM MSG_DF_1_ORIGIN_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1869273SAli.Bahrami@Sun.COM MSG_DF_1_DIRECT_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1879273SAli.Bahrami@Sun.COM MSG_DF_1_TRANS_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1889273SAli.Bahrami@Sun.COM MSG_DF_1_INTERPOSE_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1899273SAli.Bahrami@Sun.COM MSG_DF_1_NODEFLIB_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1909273SAli.Bahrami@Sun.COM MSG_DF_1_NODUMP_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1919273SAli.Bahrami@Sun.COM MSG_DF_1_CONFALT_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1929273SAli.Bahrami@Sun.COM MSG_DF_1_ENDFILTEE_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1939273SAli.Bahrami@Sun.COM MSG_DF_1_DISPRELPND_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1949273SAli.Bahrami@Sun.COM MSG_DF_1_DISPRELDNE_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1959273SAli.Bahrami@Sun.COM MSG_DF_1_NODIRECT_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1969273SAli.Bahrami@Sun.COM MSG_DF_1_IGNMULDEF_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1979273SAli.Bahrami@Sun.COM MSG_DF_1_NOKSYMS_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1989273SAli.Bahrami@Sun.COM MSG_DF_1_NOHDR_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 1999273SAli.Bahrami@Sun.COM MSG_DF_1_NORELOC_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 2009273SAli.Bahrami@Sun.COM MSG_DF_1_SYMINTPOSE_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 2019273SAli.Bahrami@Sun.COM MSG_DF_1_GLOBAUDIT_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 2029273SAli.Bahrami@Sun.COM MSG_DF_1_SINGLETON_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 2039273SAli.Bahrami@Sun.COM CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 2044734Sab196087 2059273SAli.Bahrami@Sun.COM /* 2069273SAli.Bahrami@Sun.COM * Ensure that Conv_dyn_flag1_buf_t is large enough: 2079273SAli.Bahrami@Sun.COM * 2089273SAli.Bahrami@Sun.COM * FLAG1SZ is the real minimum size of the buffer required by 2099273SAli.Bahrami@Sun.COM * conv_dyn_flag1(). However, Conv_dyn_flag1_buf_t uses 2109273SAli.Bahrami@Sun.COM * CONV_DYN_FLAG1_BUFSIZE to set the buffer size. We do things this 2119273SAli.Bahrami@Sun.COM * way because the definition of FLAG1SZ uses information that is not 2129273SAli.Bahrami@Sun.COM * available in the environment of other programs that include the 2139273SAli.Bahrami@Sun.COM * conv.h header file. 2149273SAli.Bahrami@Sun.COM */ 2155152Sab196087 #if (CONV_DYN_FLAG1_BUFSIZE != FLAG1SZ) && !defined(__lint) 2165152Sab196087 #define REPORT_BUFSIZE FLAG1SZ 2175152Sab196087 #include "report_bufsize.h" 2185152Sab196087 #error "CONV_DYN_FLAG1_BUFSIZE does not match FLAG1SZ" 2194734Sab196087 #endif 2200Sstevel@tonic-gate 2219273SAli.Bahrami@Sun.COM static const Val_desc vda_def[] = { 2229273SAli.Bahrami@Sun.COM { DF_1_NOW, MSG_DF_1_NOW_CFNP }, 2239273SAli.Bahrami@Sun.COM { DF_1_GLOBAL, MSG_DF_1_GLOBAL_CFNP }, 2249273SAli.Bahrami@Sun.COM { DF_1_GROUP, MSG_DF_1_GROUP_CFNP }, 2259273SAli.Bahrami@Sun.COM { DF_1_NODELETE, MSG_DF_1_NODELETE_CFNP }, 2269273SAli.Bahrami@Sun.COM { DF_1_LOADFLTR, MSG_DF_1_LOADFLTR_CFNP }, 2279273SAli.Bahrami@Sun.COM { DF_1_INITFIRST, MSG_DF_1_INITFIRST_CFNP }, 2289273SAli.Bahrami@Sun.COM { DF_1_NOOPEN, MSG_DF_1_NOOPEN_CFNP }, 2299273SAli.Bahrami@Sun.COM { DF_1_ORIGIN, MSG_DF_1_ORIGIN_CFNP }, 2309273SAli.Bahrami@Sun.COM { DF_1_DIRECT, MSG_DF_1_DIRECT_CFNP }, 2319273SAli.Bahrami@Sun.COM { DF_1_TRANS, MSG_DF_1_TRANS_CFNP }, 2329273SAli.Bahrami@Sun.COM { DF_1_INTERPOSE, MSG_DF_1_INTERPOSE_DEF }, 2339273SAli.Bahrami@Sun.COM { DF_1_NODEFLIB, MSG_DF_1_NODEFLIB_CFNP }, 2349273SAli.Bahrami@Sun.COM { DF_1_NODUMP, MSG_DF_1_NODUMP_CFNP }, 2359273SAli.Bahrami@Sun.COM { DF_1_CONFALT, MSG_DF_1_CONFALT_CFNP }, 2369273SAli.Bahrami@Sun.COM { DF_1_ENDFILTEE, MSG_DF_1_ENDFILTEE_CFNP }, 2379273SAli.Bahrami@Sun.COM { DF_1_DISPRELDNE, MSG_DF_1_DISPRELDNE_DEF }, 2389273SAli.Bahrami@Sun.COM { DF_1_DISPRELPND, MSG_DF_1_DISPRELPND_DEF }, 2399273SAli.Bahrami@Sun.COM { DF_1_NODIRECT, MSG_DF_1_NODIRECT_CFNP }, 2409273SAli.Bahrami@Sun.COM { DF_1_IGNMULDEF, MSG_DF_1_IGNMULDEF_DEF }, 2419273SAli.Bahrami@Sun.COM { DF_1_NOKSYMS, MSG_DF_1_NOKSYMS_CFNP }, 2429273SAli.Bahrami@Sun.COM { DF_1_NOHDR, MSG_DF_1_NOHDR_CFNP }, 2439273SAli.Bahrami@Sun.COM { DF_1_EDITED, MSG_DF_1_EDITED_CFNP }, 2449273SAli.Bahrami@Sun.COM { DF_1_NORELOC, MSG_DF_1_NORELOC_CFNP }, 2459273SAli.Bahrami@Sun.COM { DF_1_SYMINTPOSE, MSG_DF_1_SYMINTPOSE_DEF }, 2469273SAli.Bahrami@Sun.COM { DF_1_GLOBAUDIT, MSG_DF_1_GLOBAUDIT_DEF }, 2479273SAli.Bahrami@Sun.COM { DF_1_SINGLETON, MSG_DF_1_SINGLETON_DEF }, 2489273SAli.Bahrami@Sun.COM { 0, 0 } 2499273SAli.Bahrami@Sun.COM }; 2509273SAli.Bahrami@Sun.COM static const Val_desc vda_cf[] = { 2519273SAli.Bahrami@Sun.COM { DF_1_NOW, MSG_DF_1_NOW_CF }, 2529273SAli.Bahrami@Sun.COM { DF_1_GLOBAL, MSG_DF_1_GLOBAL_CF }, 2539273SAli.Bahrami@Sun.COM { DF_1_GROUP, MSG_DF_1_GROUP_CF }, 2549273SAli.Bahrami@Sun.COM { DF_1_NODELETE, MSG_DF_1_NODELETE_CF }, 2559273SAli.Bahrami@Sun.COM { DF_1_LOADFLTR, MSG_DF_1_LOADFLTR_CF }, 2569273SAli.Bahrami@Sun.COM { DF_1_INITFIRST, MSG_DF_1_INITFIRST_CF }, 2579273SAli.Bahrami@Sun.COM { DF_1_NOOPEN, MSG_DF_1_NOOPEN_CF }, 2589273SAli.Bahrami@Sun.COM { DF_1_ORIGIN, MSG_DF_1_ORIGIN_CF }, 2599273SAli.Bahrami@Sun.COM { DF_1_DIRECT, MSG_DF_1_DIRECT_CF }, 2609273SAli.Bahrami@Sun.COM { DF_1_TRANS, MSG_DF_1_TRANS_CF }, 2619273SAli.Bahrami@Sun.COM { DF_1_INTERPOSE, MSG_DF_1_INTERPOSE_CF }, 2629273SAli.Bahrami@Sun.COM { DF_1_NODEFLIB, MSG_DF_1_NODEFLIB_CF }, 2639273SAli.Bahrami@Sun.COM { DF_1_NODUMP, MSG_DF_1_NODUMP_CF }, 2649273SAli.Bahrami@Sun.COM { DF_1_CONFALT, MSG_DF_1_CONFALT_CF }, 2659273SAli.Bahrami@Sun.COM { DF_1_ENDFILTEE, MSG_DF_1_ENDFILTEE_CF }, 2669273SAli.Bahrami@Sun.COM { DF_1_DISPRELDNE, MSG_DF_1_DISPRELDNE_CF }, 2679273SAli.Bahrami@Sun.COM { DF_1_DISPRELPND, MSG_DF_1_DISPRELPND_CF }, 2689273SAli.Bahrami@Sun.COM { DF_1_NODIRECT, MSG_DF_1_NODIRECT_CF }, 2699273SAli.Bahrami@Sun.COM { DF_1_IGNMULDEF, MSG_DF_1_IGNMULDEF_CF }, 2709273SAli.Bahrami@Sun.COM { DF_1_NOKSYMS, MSG_DF_1_NOKSYMS_CF }, 2719273SAli.Bahrami@Sun.COM { DF_1_NOHDR, MSG_DF_1_NOHDR_CF }, 2729273SAli.Bahrami@Sun.COM { DF_1_EDITED, MSG_DF_1_EDITED_CF }, 2739273SAli.Bahrami@Sun.COM { DF_1_NORELOC, MSG_DF_1_NORELOC_CF }, 2749273SAli.Bahrami@Sun.COM { DF_1_SYMINTPOSE, MSG_DF_1_SYMINTPOSE_CF }, 2759273SAli.Bahrami@Sun.COM { DF_1_GLOBAUDIT, MSG_DF_1_GLOBAUDIT_CF }, 2769273SAli.Bahrami@Sun.COM { DF_1_SINGLETON, MSG_DF_1_SINGLETON_CF }, 2771618Srie { 0, 0 } 2781618Srie }; 2799273SAli.Bahrami@Sun.COM static const Val_desc vda_cfnp[] = { 2809273SAli.Bahrami@Sun.COM { DF_1_NOW, MSG_DF_1_NOW_CFNP }, 2819273SAli.Bahrami@Sun.COM { DF_1_GLOBAL, MSG_DF_1_GLOBAL_CFNP }, 2829273SAli.Bahrami@Sun.COM { DF_1_GROUP, MSG_DF_1_GROUP_CFNP }, 2839273SAli.Bahrami@Sun.COM { DF_1_NODELETE, MSG_DF_1_NODELETE_CFNP }, 2849273SAli.Bahrami@Sun.COM { DF_1_LOADFLTR, MSG_DF_1_LOADFLTR_CFNP }, 2859273SAli.Bahrami@Sun.COM { DF_1_INITFIRST, MSG_DF_1_INITFIRST_CFNP }, 2869273SAli.Bahrami@Sun.COM { DF_1_NOOPEN, MSG_DF_1_NOOPEN_CFNP }, 2879273SAli.Bahrami@Sun.COM { DF_1_ORIGIN, MSG_DF_1_ORIGIN_CFNP }, 2889273SAli.Bahrami@Sun.COM { DF_1_DIRECT, MSG_DF_1_DIRECT_CFNP }, 2899273SAli.Bahrami@Sun.COM { DF_1_TRANS, MSG_DF_1_TRANS_CFNP }, 2909273SAli.Bahrami@Sun.COM { DF_1_INTERPOSE, MSG_DF_1_INTERPOSE_CFNP }, 2919273SAli.Bahrami@Sun.COM { DF_1_NODEFLIB, MSG_DF_1_NODEFLIB_CFNP }, 2929273SAli.Bahrami@Sun.COM { DF_1_NODUMP, MSG_DF_1_NODUMP_CFNP }, 2939273SAli.Bahrami@Sun.COM { DF_1_CONFALT, MSG_DF_1_CONFALT_CFNP }, 2949273SAli.Bahrami@Sun.COM { DF_1_ENDFILTEE, MSG_DF_1_ENDFILTEE_CFNP }, 2959273SAli.Bahrami@Sun.COM { DF_1_DISPRELDNE, MSG_DF_1_DISPRELDNE_CFNP }, 2969273SAli.Bahrami@Sun.COM { DF_1_DISPRELPND, MSG_DF_1_DISPRELPND_CFNP }, 2979273SAli.Bahrami@Sun.COM { DF_1_NODIRECT, MSG_DF_1_NODIRECT_CFNP }, 2989273SAli.Bahrami@Sun.COM { DF_1_IGNMULDEF, MSG_DF_1_IGNMULDEF_CFNP }, 2999273SAli.Bahrami@Sun.COM { DF_1_NOKSYMS, MSG_DF_1_NOKSYMS_CFNP }, 3009273SAli.Bahrami@Sun.COM { DF_1_NOHDR, MSG_DF_1_NOHDR_CFNP }, 3019273SAli.Bahrami@Sun.COM { DF_1_EDITED, MSG_DF_1_EDITED_CFNP }, 3029273SAli.Bahrami@Sun.COM { DF_1_NORELOC, MSG_DF_1_NORELOC_CFNP }, 3039273SAli.Bahrami@Sun.COM { DF_1_SYMINTPOSE, MSG_DF_1_SYMINTPOSE_CFNP }, 3049273SAli.Bahrami@Sun.COM { DF_1_GLOBAUDIT, MSG_DF_1_GLOBAUDIT_CFNP }, 3059273SAli.Bahrami@Sun.COM { DF_1_SINGLETON, MSG_DF_1_SINGLETON_CFNP }, 3069273SAli.Bahrami@Sun.COM { 0, 0 } 3079273SAli.Bahrami@Sun.COM }; 3089273SAli.Bahrami@Sun.COM static const Val_desc vda_nf[] = { 3099273SAli.Bahrami@Sun.COM { DF_1_NOW, MSG_DF_1_NOW_NF }, 3109273SAli.Bahrami@Sun.COM { DF_1_GLOBAL, MSG_DF_1_GLOBAL_NF }, 3119273SAli.Bahrami@Sun.COM { DF_1_GROUP, MSG_DF_1_GROUP_NF }, 3129273SAli.Bahrami@Sun.COM { DF_1_NODELETE, MSG_DF_1_NODELETE_NF }, 3139273SAli.Bahrami@Sun.COM { DF_1_LOADFLTR, MSG_DF_1_LOADFLTR_NF }, 3149273SAli.Bahrami@Sun.COM { DF_1_INITFIRST, MSG_DF_1_INITFIRST_NF }, 3159273SAli.Bahrami@Sun.COM { DF_1_NOOPEN, MSG_DF_1_NOOPEN_NF }, 3169273SAli.Bahrami@Sun.COM { DF_1_ORIGIN, MSG_DF_1_ORIGIN_NF }, 3179273SAli.Bahrami@Sun.COM { DF_1_DIRECT, MSG_DF_1_DIRECT_NF }, 3189273SAli.Bahrami@Sun.COM { DF_1_TRANS, MSG_DF_1_TRANS_NF }, 3199273SAli.Bahrami@Sun.COM { DF_1_INTERPOSE, MSG_DF_1_INTERPOSE_NF }, 3209273SAli.Bahrami@Sun.COM { DF_1_NODEFLIB, MSG_DF_1_NODEFLIB_NF }, 3219273SAli.Bahrami@Sun.COM { DF_1_NODUMP, MSG_DF_1_NODUMP_NF }, 3229273SAli.Bahrami@Sun.COM { DF_1_CONFALT, MSG_DF_1_CONFALT_NF }, 3239273SAli.Bahrami@Sun.COM { DF_1_ENDFILTEE, MSG_DF_1_ENDFILTEE_NF }, 3249273SAli.Bahrami@Sun.COM { DF_1_DISPRELDNE, MSG_DF_1_DISPRELDNE_NF }, 3259273SAli.Bahrami@Sun.COM { DF_1_DISPRELPND, MSG_DF_1_DISPRELPND_NF }, 3269273SAli.Bahrami@Sun.COM { DF_1_NODIRECT, MSG_DF_1_NODIRECT_NF }, 3279273SAli.Bahrami@Sun.COM { DF_1_IGNMULDEF, MSG_DF_1_IGNMULDEF_NF }, 3289273SAli.Bahrami@Sun.COM { DF_1_NOKSYMS, MSG_DF_1_NOKSYMS_NF }, 3299273SAli.Bahrami@Sun.COM { DF_1_NOHDR, MSG_DF_1_NOHDR_NF }, 3309273SAli.Bahrami@Sun.COM { DF_1_EDITED, MSG_DF_1_EDITED_NF }, 3319273SAli.Bahrami@Sun.COM { DF_1_NORELOC, MSG_DF_1_NORELOC_NF }, 3329273SAli.Bahrami@Sun.COM { DF_1_SYMINTPOSE, MSG_DF_1_SYMINTPOSE_NF }, 3339273SAli.Bahrami@Sun.COM { DF_1_GLOBAUDIT, MSG_DF_1_GLOBAUDIT_NF }, 3349273SAli.Bahrami@Sun.COM { DF_1_SINGLETON, MSG_DF_1_SINGLETON_NF }, 3359273SAli.Bahrami@Sun.COM { 0, 0 } 3369273SAli.Bahrami@Sun.COM }; 3370Sstevel@tonic-gate 3389273SAli.Bahrami@Sun.COM switch (CONV_TYPE_FMT_ALT(fmt_flags)) { 3399273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_CF: 3409273SAli.Bahrami@Sun.COM return (vda_cf); 3419273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_CFNP: 3429273SAli.Bahrami@Sun.COM return (vda_cfnp); 3439273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_NF: 3449273SAli.Bahrami@Sun.COM return (vda_nf); 3459273SAli.Bahrami@Sun.COM } 3460Sstevel@tonic-gate 3479273SAli.Bahrami@Sun.COM return (vda_def); 3480Sstevel@tonic-gate } 3490Sstevel@tonic-gate 3509273SAli.Bahrami@Sun.COM conv_iter_ret_t 3519273SAli.Bahrami@Sun.COM conv_iter_dyn_flag1(Conv_fmt_flags_t fmt_flags, conv_iter_cb_t func, 3529273SAli.Bahrami@Sun.COM void *uvalue) 3539273SAli.Bahrami@Sun.COM { 3549273SAli.Bahrami@Sun.COM return (conv_iter_vd(conv_dyn_flag1_strings(fmt_flags), func, uvalue)); 3559273SAli.Bahrami@Sun.COM } 3564734Sab196087 3579273SAli.Bahrami@Sun.COM const Val_desc * 3589273SAli.Bahrami@Sun.COM conv_dyn_feature1_strings(Conv_fmt_flags_t fmt_flags) 3599273SAli.Bahrami@Sun.COM { 3609273SAli.Bahrami@Sun.COM #define FEATSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \ 3619273SAli.Bahrami@Sun.COM MSG_DTF_1_PARINIT_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 3629273SAli.Bahrami@Sun.COM MSG_DTF_1_CONFEXP_CF_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 3639273SAli.Bahrami@Sun.COM CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 3649273SAli.Bahrami@Sun.COM 3659273SAli.Bahrami@Sun.COM /* 3669273SAli.Bahrami@Sun.COM * Ensure that Conv_dyn_feature1_buf_t is large enough: 3679273SAli.Bahrami@Sun.COM * 3689273SAli.Bahrami@Sun.COM * FEATSZ is the real min size of the buffer required by 3699273SAli.Bahrami@Sun.COM * conv_dyn_feature1(). However, Conv_dyn_feature1_buf_t uses 3709273SAli.Bahrami@Sun.COM * CONV_DYN_FEATURE1_BUFSIZE to set the buffer size. We do things 3719273SAli.Bahrami@Sun.COM * this way because the definition of FEATSZ uses information that 3729273SAli.Bahrami@Sun.COM * is not available in the environment of other programs that include 3739273SAli.Bahrami@Sun.COM * the conv.h header file. 3749273SAli.Bahrami@Sun.COM */ 3755152Sab196087 #if (CONV_DYN_FEATURE1_BUFSIZE != FEATSZ) && !defined(__lint) 3765152Sab196087 #define REPORT_BUFSIZE FEATSZ 3775152Sab196087 #include "report_bufsize.h" 3785152Sab196087 #error "CONV_DYN_FEATURE1_BUFSIZE does not match FEATSZ" 3794734Sab196087 #endif 3800Sstevel@tonic-gate 3819273SAli.Bahrami@Sun.COM static const Val_desc vda_cf[] = { 3829273SAli.Bahrami@Sun.COM { DTF_1_PARINIT, MSG_DTF_1_PARINIT_CF }, 3839273SAli.Bahrami@Sun.COM { DTF_1_CONFEXP, MSG_DTF_1_CONFEXP_CF }, 3849273SAli.Bahrami@Sun.COM { 0, 0 } 3859273SAli.Bahrami@Sun.COM }; 3869273SAli.Bahrami@Sun.COM static const Val_desc vda_cfnp[] = { 3879273SAli.Bahrami@Sun.COM { DTF_1_PARINIT, MSG_DTF_1_PARINIT_CFNP }, 3889273SAli.Bahrami@Sun.COM { DTF_1_CONFEXP, MSG_DTF_1_CONFEXP_CFNP }, 3891618Srie { 0, 0 } 3901618Srie }; 3919273SAli.Bahrami@Sun.COM static const Val_desc vda_nf[] = { 3929273SAli.Bahrami@Sun.COM { DTF_1_PARINIT, MSG_DTF_1_PARINIT_NF }, 3939273SAli.Bahrami@Sun.COM { DTF_1_CONFEXP, MSG_DTF_1_CONFEXP_NF }, 3949273SAli.Bahrami@Sun.COM { 0, 0 } 3959273SAli.Bahrami@Sun.COM }; 3960Sstevel@tonic-gate 3979273SAli.Bahrami@Sun.COM switch (CONV_TYPE_FMT_ALT(fmt_flags)) { 3989273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_CF: 3999273SAli.Bahrami@Sun.COM return (vda_cf); 4009273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_NF: 4019273SAli.Bahrami@Sun.COM return (vda_nf); 4022352Sab196087 } 4030Sstevel@tonic-gate 4049273SAli.Bahrami@Sun.COM return (vda_cfnp); 4050Sstevel@tonic-gate } 4060Sstevel@tonic-gate 4079273SAli.Bahrami@Sun.COM conv_iter_ret_t 4089273SAli.Bahrami@Sun.COM conv_iter_dyn_feature1(Conv_fmt_flags_t fmt_flags, conv_iter_cb_t func, 4099273SAli.Bahrami@Sun.COM void *uvalue) 4109273SAli.Bahrami@Sun.COM { 4119273SAli.Bahrami@Sun.COM return (conv_iter_vd(conv_dyn_feature1_strings(fmt_flags), 4129273SAli.Bahrami@Sun.COM func, uvalue)); 4139273SAli.Bahrami@Sun.COM } 4149273SAli.Bahrami@Sun.COM 4159273SAli.Bahrami@Sun.COM const conv_ds_t ** 4169273SAli.Bahrami@Sun.COM conv_dyn_tag_strings(conv_iter_osabi_t osabi, Half mach, 4179273SAli.Bahrami@Sun.COM Conv_fmt_flags_t fmt_flags) 4180Sstevel@tonic-gate { 4193492Sab196087 /* 4209273SAli.Bahrami@Sun.COM * Maximum # of items that can be in the returned array. Size this 4219273SAli.Bahrami@Sun.COM * by counting the maximum depth in the switch statement that fills 4229273SAli.Bahrami@Sun.COM * retarr at the end of this function. 4233492Sab196087 */ 4249273SAli.Bahrami@Sun.COM #define MAX_RET 12 4253492Sab196087 4263492Sab196087 /* 4273492Sab196087 * Generic dynamic tags: 4289273SAli.Bahrami@Sun.COM * - Note hole between DT_FLAGS and DT_PREINIT_ARRAY (tag 32). 4299273SAli.Bahrami@Sun.COM * We use a 0, which is the signal for "not defined". 4309273SAli.Bahrami@Sun.COM * - This range has alternative names for dump, requiring an 4319273SAli.Bahrami@Sun.COM * additional array. 4323492Sab196087 */ 4339273SAli.Bahrami@Sun.COM static const Msg tags_null_cf[] = { 4349273SAli.Bahrami@Sun.COM MSG_DT_NULL_CF, MSG_DT_NEEDED_CF, 4359273SAli.Bahrami@Sun.COM MSG_DT_PLTRELSZ_CF, MSG_DT_PLTGOT_CF, 4369273SAli.Bahrami@Sun.COM MSG_DT_HASH_CF, MSG_DT_STRTAB_CF, 4379273SAli.Bahrami@Sun.COM MSG_DT_SYMTAB_CF, MSG_DT_RELA_CF, 4389273SAli.Bahrami@Sun.COM MSG_DT_RELASZ_CF, MSG_DT_RELAENT_CF, 4399273SAli.Bahrami@Sun.COM MSG_DT_STRSZ_CF, MSG_DT_SYMENT_CF, 4409273SAli.Bahrami@Sun.COM MSG_DT_INIT_CF, MSG_DT_FINI_CF, 4419273SAli.Bahrami@Sun.COM MSG_DT_SONAME_CF, MSG_DT_RPATH_CF, 4429273SAli.Bahrami@Sun.COM MSG_DT_SYMBOLIC_CF, MSG_DT_REL_CF, 4439273SAli.Bahrami@Sun.COM MSG_DT_RELSZ_CF, MSG_DT_RELENT_CF, 4449273SAli.Bahrami@Sun.COM MSG_DT_PLTREL_CF, MSG_DT_DEBUG_CF, 4459273SAli.Bahrami@Sun.COM MSG_DT_TEXTREL_CF, MSG_DT_JMPREL_CF, 4469273SAli.Bahrami@Sun.COM MSG_DT_BIND_NOW_CF, MSG_DT_INIT_ARRAY_CF, 4479273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAY_CF, MSG_DT_INIT_ARRAYSZ_CF, 4489273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAYSZ_CF, MSG_DT_RUNPATH_CF, 4499273SAli.Bahrami@Sun.COM MSG_DT_FLAGS_CF, 0, 4509273SAli.Bahrami@Sun.COM MSG_DT_PREINIT_ARRAY_CF, MSG_DT_PREINIT_ARRAYSZ_CF 4519273SAli.Bahrami@Sun.COM }; 4529273SAli.Bahrami@Sun.COM static const Msg tags_null_cfnp[] = { 4539273SAli.Bahrami@Sun.COM MSG_DT_NULL_CFNP, MSG_DT_NEEDED_CFNP, 4549273SAli.Bahrami@Sun.COM MSG_DT_PLTRELSZ_CFNP, MSG_DT_PLTGOT_CFNP, 4559273SAli.Bahrami@Sun.COM MSG_DT_HASH_CFNP, MSG_DT_STRTAB_CFNP, 4569273SAli.Bahrami@Sun.COM MSG_DT_SYMTAB_CFNP, MSG_DT_RELA_CFNP, 4579273SAli.Bahrami@Sun.COM MSG_DT_RELASZ_CFNP, MSG_DT_RELAENT_CFNP, 4589273SAli.Bahrami@Sun.COM MSG_DT_STRSZ_CFNP, MSG_DT_SYMENT_CFNP, 4599273SAli.Bahrami@Sun.COM MSG_DT_INIT_CFNP, MSG_DT_FINI_CFNP, 4609273SAli.Bahrami@Sun.COM MSG_DT_SONAME_CFNP, MSG_DT_RPATH_CFNP, 4619273SAli.Bahrami@Sun.COM MSG_DT_SYMBOLIC_CFNP, MSG_DT_REL_CFNP, 4629273SAli.Bahrami@Sun.COM MSG_DT_RELSZ_CFNP, MSG_DT_RELENT_CFNP, 4639273SAli.Bahrami@Sun.COM MSG_DT_PLTREL_CFNP, MSG_DT_DEBUG_CFNP, 4649273SAli.Bahrami@Sun.COM MSG_DT_TEXTREL_CFNP, MSG_DT_JMPREL_CFNP, 4659273SAli.Bahrami@Sun.COM MSG_DT_BIND_NOW_CFNP, MSG_DT_INIT_ARRAY_CFNP, 4669273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAY_CFNP, MSG_DT_INIT_ARRAYSZ_CFNP, 4679273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAYSZ_CFNP, MSG_DT_RUNPATH_CFNP, 4689273SAli.Bahrami@Sun.COM MSG_DT_FLAGS_CFNP, 0, 4699273SAli.Bahrami@Sun.COM MSG_DT_PREINIT_ARRAY_CFNP, MSG_DT_PREINIT_ARRAYSZ_CFNP 4701618Srie }; 4719273SAli.Bahrami@Sun.COM static const Msg tags_null_nf[] = { 4729273SAli.Bahrami@Sun.COM MSG_DT_NULL_NF, MSG_DT_NEEDED_NF, 4739273SAli.Bahrami@Sun.COM MSG_DT_PLTRELSZ_NF, MSG_DT_PLTGOT_NF, 4749273SAli.Bahrami@Sun.COM MSG_DT_HASH_NF, MSG_DT_STRTAB_NF, 4759273SAli.Bahrami@Sun.COM MSG_DT_SYMTAB_NF, MSG_DT_RELA_NF, 4769273SAli.Bahrami@Sun.COM MSG_DT_RELASZ_NF, MSG_DT_RELAENT_NF, 4779273SAli.Bahrami@Sun.COM MSG_DT_STRSZ_NF, MSG_DT_SYMENT_NF, 4789273SAli.Bahrami@Sun.COM MSG_DT_INIT_NF, MSG_DT_FINI_NF, 4799273SAli.Bahrami@Sun.COM MSG_DT_SONAME_NF, MSG_DT_RPATH_NF, 4809273SAli.Bahrami@Sun.COM MSG_DT_SYMBOLIC_NF, MSG_DT_REL_NF, 4819273SAli.Bahrami@Sun.COM MSG_DT_RELSZ_NF, MSG_DT_RELENT_NF, 4829273SAli.Bahrami@Sun.COM MSG_DT_PLTREL_NF, MSG_DT_DEBUG_NF, 4839273SAli.Bahrami@Sun.COM MSG_DT_TEXTREL_NF, MSG_DT_JMPREL_NF, 4849273SAli.Bahrami@Sun.COM MSG_DT_BIND_NOW_NF, MSG_DT_INIT_ARRAY_NF, 4859273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAY_NF, MSG_DT_INIT_ARRAYSZ_NF, 4869273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAYSZ_NF, MSG_DT_RUNPATH_NF, 4879273SAli.Bahrami@Sun.COM MSG_DT_FLAGS_NF, 0, 4889273SAli.Bahrami@Sun.COM MSG_DT_PREINIT_ARRAY_NF, MSG_DT_PREINIT_ARRAYSZ_NF 4893492Sab196087 }; 4909273SAli.Bahrami@Sun.COM static const Msg tags_null_dmp[] = { 4919273SAli.Bahrami@Sun.COM MSG_DT_NULL_CFNP, MSG_DT_NEEDED_CFNP, 4929273SAli.Bahrami@Sun.COM MSG_DT_PLTRELSZ_DMP, MSG_DT_PLTGOT_CFNP, 4939273SAli.Bahrami@Sun.COM MSG_DT_HASH_CFNP, MSG_DT_STRTAB_CFNP, 4949273SAli.Bahrami@Sun.COM MSG_DT_SYMTAB_CFNP, MSG_DT_RELA_CFNP, 4959273SAli.Bahrami@Sun.COM MSG_DT_RELASZ_CFNP, MSG_DT_RELAENT_CFNP, 4969273SAli.Bahrami@Sun.COM MSG_DT_STRSZ_CFNP, MSG_DT_SYMENT_CFNP, 4979273SAli.Bahrami@Sun.COM MSG_DT_INIT_CFNP, MSG_DT_FINI_CFNP, 4989273SAli.Bahrami@Sun.COM MSG_DT_SONAME_CFNP, MSG_DT_RPATH_CFNP, 4999273SAli.Bahrami@Sun.COM MSG_DT_SYMBOLIC_DMP, MSG_DT_REL_CFNP, 5009273SAli.Bahrami@Sun.COM MSG_DT_RELSZ_CFNP, MSG_DT_RELENT_CFNP, 5019273SAli.Bahrami@Sun.COM MSG_DT_PLTREL_CFNP, MSG_DT_DEBUG_CFNP, 5029273SAli.Bahrami@Sun.COM MSG_DT_TEXTREL_CFNP, MSG_DT_JMPREL_CFNP, 5039273SAli.Bahrami@Sun.COM MSG_DT_BIND_NOW_CFNP, MSG_DT_INIT_ARRAY_CFNP, 5049273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAY_CFNP, MSG_DT_INIT_ARRAYSZ_CFNP, 5059273SAli.Bahrami@Sun.COM MSG_DT_FINI_ARRAYSZ_CFNP, MSG_DT_RUNPATH_CFNP, 5069273SAli.Bahrami@Sun.COM MSG_DT_FLAGS_CFNP, 0, 5079273SAli.Bahrami@Sun.COM MSG_DT_PREINIT_ARRAY_CFNP, MSG_DT_PREINIT_ARRAYSZ_CFNP 5081976Sab196087 }; 5099273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_null_cf = { 5109273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_NULL, tags_null_cf) }; 5119273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_null_cfnp = { 5129273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_NULL, tags_null_cfnp) }; 5139273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_null_nf = { 5149273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_NULL, tags_null_nf) }; 5159273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_null_dmp = { 5169273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_NULL, tags_null_dmp) }; 5170Sstevel@tonic-gate 5183492Sab196087 /* 5199273SAli.Bahrami@Sun.COM * DT_SPARC_REGISTER was originally assigned 0x7000001. It is processor 5209273SAli.Bahrami@Sun.COM * specific, and should have been in the range DT_LOPROC-DT_HIPROC 5219273SAli.Bahrami@Sun.COM * instead of here. When the error was fixed, 5229273SAli.Bahrami@Sun.COM * DT_DEPRECATED_SPARC_REGISTER was created to maintain backward 5239273SAli.Bahrami@Sun.COM * compatability. 5249273SAli.Bahrami@Sun.COM */ 5259273SAli.Bahrami@Sun.COM static const Msg tags_sdreg_cf[] = { 5269273SAli.Bahrami@Sun.COM MSG_DT_DEP_SPARC_REG_CF }; 5279273SAli.Bahrami@Sun.COM static const Msg tags_sdreg_cfnp[] = { 5289273SAli.Bahrami@Sun.COM MSG_DT_DEP_SPARC_REG_CFNP }; 5299273SAli.Bahrami@Sun.COM static const Msg tags_sdreg_nf[] = { 5309273SAli.Bahrami@Sun.COM MSG_DT_DEP_SPARC_REG_NF }; 5319273SAli.Bahrami@Sun.COM 5329273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sdreg_cf = { 5339273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_DEPRECATED_SPARC_REGISTER, tags_sdreg_cf) }; 5349273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sdreg_cfnp = { 5359273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_DEPRECATED_SPARC_REGISTER, tags_sdreg_cfnp) }; 5369273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sdreg_nf = { 5379273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_DEPRECATED_SPARC_REGISTER, tags_sdreg_nf) }; 5389273SAli.Bahrami@Sun.COM 5399273SAli.Bahrami@Sun.COM 5409273SAli.Bahrami@Sun.COM /* 5419273SAli.Bahrami@Sun.COM * SUNW: DT_LOOS -> DT_HIOS range. Note holes between DT_SUNW_TLSSORTSZ, 5426206Sab196087 * DT_SUNW_STRPAD, and DT_SUNW_LDMACH. We handle the outliers 5436206Sab196087 * separately below as single values. 5443492Sab196087 */ 5459273SAli.Bahrami@Sun.COM static const Msg tags_sunw_auxiliary_cf[] = { 5469273SAli.Bahrami@Sun.COM MSG_DT_SUNW_AUXILIARY_CF, MSG_DT_SUNW_RTLDINF_CF, 5479273SAli.Bahrami@Sun.COM MSG_DT_SUNW_FILTER_CF, MSG_DT_SUNW_CAP_CF, 5489273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SYMTAB_CF, MSG_DT_SUNW_SYMSZ_CF, 5499273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SORTENT_CF, MSG_DT_SUNW_SYMSORT_CF, 5509273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SYMSORTSZ_CF, MSG_DT_SUNW_TLSSORT_CF, 551*11827SRod.Evans@Sun.COM MSG_DT_SUNW_TLSSORTSZ_CF, MSG_DT_SUNW_CAPINFO_CF, 552*11827SRod.Evans@Sun.COM MSG_DT_SUNW_STRPAD_CF, MSG_DT_SUNW_CAPCHAIN_CF, 553*11827SRod.Evans@Sun.COM MSG_DT_SUNW_LDMACH_CF, 0, 554*11827SRod.Evans@Sun.COM MSG_DT_SUNW_CAPCHAINENT_CF, 0, 555*11827SRod.Evans@Sun.COM MSG_DT_SUNW_CAPCHAINSZ_CF 5569273SAli.Bahrami@Sun.COM }; 5579273SAli.Bahrami@Sun.COM static const Msg tags_sunw_auxiliary_cfnp[] = { 5589273SAli.Bahrami@Sun.COM MSG_DT_SUNW_AUXILIARY_CFNP, MSG_DT_SUNW_RTLDINF_CFNP, 5599273SAli.Bahrami@Sun.COM MSG_DT_SUNW_FILTER_CFNP, MSG_DT_SUNW_CAP_CFNP, 5609273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SYMTAB_CFNP, MSG_DT_SUNW_SYMSZ_CFNP, 5619273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SORTENT_CFNP, MSG_DT_SUNW_SYMSORT_CFNP, 5629273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SYMSORTSZ_CFNP, MSG_DT_SUNW_TLSSORT_CFNP, 563*11827SRod.Evans@Sun.COM MSG_DT_SUNW_TLSSORTSZ_CFNP, MSG_DT_SUNW_CAPINFO_CFNP, 564*11827SRod.Evans@Sun.COM MSG_DT_SUNW_STRPAD_CFNP, MSG_DT_SUNW_CAPCHAIN_CFNP, 565*11827SRod.Evans@Sun.COM MSG_DT_SUNW_LDMACH_CFNP, 0, 566*11827SRod.Evans@Sun.COM MSG_DT_SUNW_CAPCHAINENT_CFNP, 0, 567*11827SRod.Evans@Sun.COM MSG_DT_SUNW_CAPCHAINSZ_CFNP 5683492Sab196087 }; 5699273SAli.Bahrami@Sun.COM static const Msg tags_sunw_auxiliary_nf[] = { 5709273SAli.Bahrami@Sun.COM MSG_DT_SUNW_AUXILIARY_NF, MSG_DT_SUNW_RTLDINF_NF, 5719273SAli.Bahrami@Sun.COM MSG_DT_SUNW_FILTER_NF, MSG_DT_SUNW_CAP_NF, 5729273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SYMTAB_NF, MSG_DT_SUNW_SYMSZ_NF, 5739273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SORTENT_NF, MSG_DT_SUNW_SYMSORT_NF, 5749273SAli.Bahrami@Sun.COM MSG_DT_SUNW_SYMSORTSZ_NF, MSG_DT_SUNW_TLSSORT_NF, 575*11827SRod.Evans@Sun.COM MSG_DT_SUNW_TLSSORTSZ_NF, MSG_DT_SUNW_CAPINFO_NF, 576*11827SRod.Evans@Sun.COM MSG_DT_SUNW_STRPAD_NF, MSG_DT_SUNW_CAPCHAIN_NF, 577*11827SRod.Evans@Sun.COM MSG_DT_SUNW_LDMACH_NF, 0, 578*11827SRod.Evans@Sun.COM MSG_DT_SUNW_CAPCHAINENT_NF, 0, 579*11827SRod.Evans@Sun.COM MSG_DT_SUNW_CAPCHAINSZ_NF 5809273SAli.Bahrami@Sun.COM }; 5819273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sunw_auxiliary_cf = { 5829273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_cf) }; 5839273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sunw_auxiliary_cfnp = { 5849273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_cfnp) }; 5859273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sunw_auxiliary_nf = { 5869273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_SUNW_AUXILIARY, tags_sunw_auxiliary_nf) }; 5879273SAli.Bahrami@Sun.COM 5889273SAli.Bahrami@Sun.COM /* 5899273SAli.Bahrami@Sun.COM * GNU: (In DT_VALRNGLO section) DT_GNU_PRELINKED - DT_GNU_LIBLISTSZ 5909273SAli.Bahrami@Sun.COM */ 5919273SAli.Bahrami@Sun.COM static const Msg tags_gnu_prelinked_cf[] = { 5929273SAli.Bahrami@Sun.COM MSG_DT_GNU_PRELINKED_CF, MSG_DT_GNU_CONFLICTSZ_CF, 5939273SAli.Bahrami@Sun.COM MSG_DT_GNU_LIBLISTSZ_CF 5949273SAli.Bahrami@Sun.COM }; 5959273SAli.Bahrami@Sun.COM static const Msg tags_gnu_prelinked_cfnp[] = { 5969273SAli.Bahrami@Sun.COM MSG_DT_GNU_PRELINKED_CFNP, MSG_DT_GNU_CONFLICTSZ_CFNP, 5979273SAli.Bahrami@Sun.COM MSG_DT_GNU_LIBLISTSZ_CFNP 5989273SAli.Bahrami@Sun.COM }; 5999273SAli.Bahrami@Sun.COM static const Msg tags_gnu_prelinked_nf[] = { 6009273SAli.Bahrami@Sun.COM MSG_DT_GNU_PRELINKED_NF, MSG_DT_GNU_CONFLICTSZ_NF, 6019273SAli.Bahrami@Sun.COM MSG_DT_GNU_LIBLISTSZ_NF 6029273SAli.Bahrami@Sun.COM }; 6039273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_gnu_prelinked_cf = { 6049273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_GNU_PRELINKED, tags_gnu_prelinked_cf) }; 6059273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_gnu_prelinked_cfnp = { 6069273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_GNU_PRELINKED, tags_gnu_prelinked_cfnp) }; 6079273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_gnu_prelinked_nf = { 6089273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_GNU_PRELINKED, tags_gnu_prelinked_nf) }; 6090Sstevel@tonic-gate 6103492Sab196087 /* 6113492Sab196087 * SUNW: DT_VALRNGLO - DT_VALRNGHI range. 6123492Sab196087 */ 6139273SAli.Bahrami@Sun.COM static const Msg tags_checksum_cf[] = { 6149273SAli.Bahrami@Sun.COM MSG_DT_CHECKSUM_CF, MSG_DT_PLTPADSZ_CF, 6159273SAli.Bahrami@Sun.COM MSG_DT_MOVEENT_CF, MSG_DT_MOVESZ_CF, 6169273SAli.Bahrami@Sun.COM MSG_DT_FEATURE_1_CF, MSG_DT_POSFLAG_1_CF, 6179273SAli.Bahrami@Sun.COM MSG_DT_SYMINSZ_CF, MSG_DT_SYMINENT_CF 6189273SAli.Bahrami@Sun.COM }; 6199273SAli.Bahrami@Sun.COM static const Msg tags_checksum_cfnp[] = { 6209273SAli.Bahrami@Sun.COM MSG_DT_CHECKSUM_CFNP, MSG_DT_PLTPADSZ_CFNP, 6219273SAli.Bahrami@Sun.COM MSG_DT_MOVEENT_CFNP, MSG_DT_MOVESZ_CFNP, 6229273SAli.Bahrami@Sun.COM MSG_DT_FEATURE_1_CFNP, MSG_DT_POSFLAG_1_CFNP, 6239273SAli.Bahrami@Sun.COM MSG_DT_SYMINSZ_CFNP, MSG_DT_SYMINENT_CFNP 6249273SAli.Bahrami@Sun.COM }; 6259273SAli.Bahrami@Sun.COM static const Msg tags_checksum_nf[] = { 6269273SAli.Bahrami@Sun.COM MSG_DT_CHECKSUM_NF, MSG_DT_PLTPADSZ_NF, 6279273SAli.Bahrami@Sun.COM MSG_DT_MOVEENT_NF, MSG_DT_MOVESZ_NF, 6289273SAli.Bahrami@Sun.COM MSG_DT_FEATURE_1_NF, MSG_DT_POSFLAG_1_NF, 6299273SAli.Bahrami@Sun.COM MSG_DT_SYMINSZ_NF, MSG_DT_SYMINENT_NF 6303492Sab196087 }; 6319273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_checksum_cf = { 6329273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_CHECKSUM, tags_checksum_cf) }; 6339273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_checksum_cfnp = { 6349273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_CHECKSUM, tags_checksum_cfnp) }; 6359273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_checksum_nf = { 6369273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_CHECKSUM, tags_checksum_nf) }; 6379273SAli.Bahrami@Sun.COM 6389273SAli.Bahrami@Sun.COM /* 6399273SAli.Bahrami@Sun.COM * GNU: (In DT_ADDRRNGLO section) DT_GNU_HASH - DT_GNU_LIBLIST 6409273SAli.Bahrami@Sun.COM */ 6419273SAli.Bahrami@Sun.COM static const Msg tags_gnu_hash_cf[] = { 6429273SAli.Bahrami@Sun.COM MSG_DT_GNU_HASH_CF, MSG_DT_TLSDESC_PLT_CF, 6439273SAli.Bahrami@Sun.COM MSG_DT_TLSDESC_GOT_CF, MSG_DT_GNU_CONFLICT_CF, 6449273SAli.Bahrami@Sun.COM MSG_DT_GNU_LIBLIST_CF 6459273SAli.Bahrami@Sun.COM }; 6469273SAli.Bahrami@Sun.COM static const Msg tags_gnu_hash_cfnp[] = { 6479273SAli.Bahrami@Sun.COM MSG_DT_GNU_HASH_CFNP, MSG_DT_TLSDESC_PLT_CFNP, 6489273SAli.Bahrami@Sun.COM MSG_DT_TLSDESC_GOT_CFNP, MSG_DT_GNU_CONFLICT_CFNP, 6499273SAli.Bahrami@Sun.COM MSG_DT_GNU_LIBLIST_CFNP 6509273SAli.Bahrami@Sun.COM }; 6519273SAli.Bahrami@Sun.COM static const Msg tags_gnu_hash_nf[] = { 6529273SAli.Bahrami@Sun.COM MSG_DT_GNU_HASH_NF, MSG_DT_TLSDESC_PLT_NF, 6539273SAli.Bahrami@Sun.COM MSG_DT_TLSDESC_GOT_NF, MSG_DT_GNU_CONFLICT_NF, 6549273SAli.Bahrami@Sun.COM MSG_DT_GNU_LIBLIST_NF 6559273SAli.Bahrami@Sun.COM }; 6569273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_gnu_hash_cf = { 6579273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_GNU_HASH, tags_gnu_hash_cf) }; 6589273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_gnu_hash_cfnp = { 6599273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_GNU_HASH, tags_gnu_hash_cfnp) }; 6609273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_gnu_hash_nf = { 6619273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_GNU_HASH, tags_gnu_hash_nf) }; 6623492Sab196087 6633492Sab196087 /* 6643492Sab196087 * SUNW: DT_ADDRRNGLO - DT_ADDRRNGHI range. 6653492Sab196087 */ 6669273SAli.Bahrami@Sun.COM static const Msg tags_config_cf[] = { 6679273SAli.Bahrami@Sun.COM MSG_DT_CONFIG_CF, MSG_DT_DEPAUDIT_CF, 6689273SAli.Bahrami@Sun.COM MSG_DT_AUDIT_CF, MSG_DT_PLTPAD_CF, 6699273SAli.Bahrami@Sun.COM MSG_DT_MOVETAB_CF, MSG_DT_SYMINFO_CF 6709273SAli.Bahrami@Sun.COM }; 6719273SAli.Bahrami@Sun.COM static const Msg tags_config_cfnp[] = { 6729273SAli.Bahrami@Sun.COM MSG_DT_CONFIG_CFNP, MSG_DT_DEPAUDIT_CFNP, 6739273SAli.Bahrami@Sun.COM MSG_DT_AUDIT_CFNP, MSG_DT_PLTPAD_CFNP, 6749273SAli.Bahrami@Sun.COM MSG_DT_MOVETAB_CFNP, MSG_DT_SYMINFO_CFNP 6753492Sab196087 }; 6769273SAli.Bahrami@Sun.COM static const Msg tags_config_nf[] = { 6779273SAli.Bahrami@Sun.COM MSG_DT_CONFIG_NF, MSG_DT_DEPAUDIT_NF, 6789273SAli.Bahrami@Sun.COM MSG_DT_AUDIT_NF, MSG_DT_PLTPAD_NF, 6799273SAli.Bahrami@Sun.COM MSG_DT_MOVETAB_NF, MSG_DT_SYMINFO_NF 6809273SAli.Bahrami@Sun.COM }; 6819273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_config_cf = { 6829273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_CONFIG, tags_config_cf) }; 6839273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_config_cfnp = { 6849273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_CONFIG, tags_config_cfnp) }; 6859273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_config_nf = { 6869273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_CONFIG, tags_config_nf) }; 6870Sstevel@tonic-gate 6883492Sab196087 /* 6893492Sab196087 * SUNW: generic range. Note hole between DT_VERSYM and DT_RELACOUNT. 6903492Sab196087 */ 6919273SAli.Bahrami@Sun.COM static const Msg tags_versym_cf[] = { MSG_DT_VERSYM_CF }; 6929273SAli.Bahrami@Sun.COM static const Msg tags_versym_cfnp[] = { MSG_DT_VERSYM_CFNP }; 6939273SAli.Bahrami@Sun.COM static const Msg tags_versym_nf[] = { MSG_DT_VERSYM_NF }; 6949273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_versym_cf = { 6959273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_VERSYM, tags_versym_cf) }; 6969273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_versym_cfnp = { 6979273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_VERSYM, tags_versym_cfnp) }; 6989273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_versym_nf = { 6999273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_VERSYM, tags_versym_nf) }; 7009273SAli.Bahrami@Sun.COM 7019273SAli.Bahrami@Sun.COM static const Msg tags_relacount_cf[] = { 7029273SAli.Bahrami@Sun.COM MSG_DT_RELACOUNT_CF, MSG_DT_RELCOUNT_CF, 7039273SAli.Bahrami@Sun.COM MSG_DT_FLAGS_1_CF, MSG_DT_VERDEF_CF, 7049273SAli.Bahrami@Sun.COM MSG_DT_VERDEFNUM_CF, MSG_DT_VERNEED_CF, 7059273SAli.Bahrami@Sun.COM MSG_DT_VERNEEDNUM_CF 7063492Sab196087 }; 7079273SAli.Bahrami@Sun.COM static const Msg tags_relacount_cfnp[] = { 7089273SAli.Bahrami@Sun.COM MSG_DT_RELACOUNT_CFNP, MSG_DT_RELCOUNT_CFNP, 7099273SAli.Bahrami@Sun.COM MSG_DT_FLAGS_1_CFNP, MSG_DT_VERDEF_CFNP, 7109273SAli.Bahrami@Sun.COM MSG_DT_VERDEFNUM_CFNP, MSG_DT_VERNEED_CFNP, 7119273SAli.Bahrami@Sun.COM MSG_DT_VERNEEDNUM_CFNP 7129273SAli.Bahrami@Sun.COM }; 7139273SAli.Bahrami@Sun.COM static const Msg tags_relacount_nf[] = { 7149273SAli.Bahrami@Sun.COM MSG_DT_RELACOUNT_NF, MSG_DT_RELCOUNT_NF, 7159273SAli.Bahrami@Sun.COM MSG_DT_FLAGS_1_NF, MSG_DT_VERDEF_NF, 7169273SAli.Bahrami@Sun.COM MSG_DT_VERDEFNUM_NF, MSG_DT_VERNEED_NF, 7179273SAli.Bahrami@Sun.COM MSG_DT_VERNEEDNUM_NF 7189273SAli.Bahrami@Sun.COM }; 7199273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_relacount_cf = { 7209273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_RELACOUNT, tags_relacount_cf) }; 7219273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_relacount_cfnp = { 7229273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_RELACOUNT, tags_relacount_cfnp) }; 7239273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_relacount_nf = { 7249273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_RELACOUNT, tags_relacount_nf) }; 7253492Sab196087 7263492Sab196087 /* 7279273SAli.Bahrami@Sun.COM * DT_LOPROC - DT_HIPROC range: solaris/sparc-only 7289273SAli.Bahrami@Sun.COM */ 7299273SAli.Bahrami@Sun.COM static const Msg tags_sparc_reg_cf[] = { MSG_DT_SPARC_REGISTER_CF }; 7309273SAli.Bahrami@Sun.COM static const Msg tags_sparc_reg_cfnp[] = { MSG_DT_SPARC_REGISTER_CFNP }; 7319273SAli.Bahrami@Sun.COM static const Msg tags_sparc_reg_nf[] = { MSG_DT_SPARC_REGISTER_NF }; 7329273SAli.Bahrami@Sun.COM static const Msg tags_sparc_reg_dmp[] = { MSG_DT_SPARC_REGISTER_DMP }; 7339273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sparc_reg_cf = { 7349273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_SPARC_REGISTER, tags_sparc_reg_cf) }; 7359273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sparc_reg_cfnp = { 7369273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_SPARC_REGISTER, tags_sparc_reg_cfnp) }; 7379273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sparc_reg_nf = { 7389273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_SPARC_REGISTER, tags_sparc_reg_nf) }; 7399273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_sparc_reg_dmp = { 7409273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_SPARC_REGISTER, tags_sparc_reg_dmp) }; 7419273SAli.Bahrami@Sun.COM 7429273SAli.Bahrami@Sun.COM /* 7439273SAli.Bahrami@Sun.COM * DT_LOPROC - DT_HIPROC range: Solaris osabi, all hardware 7443492Sab196087 */ 7459273SAli.Bahrami@Sun.COM static const Msg tags_auxiliary_cf[] = { 7469273SAli.Bahrami@Sun.COM MSG_DT_AUXILIARY_CF, MSG_DT_USED_CF, 7479273SAli.Bahrami@Sun.COM MSG_DT_FILTER_CF 7489273SAli.Bahrami@Sun.COM }; 7499273SAli.Bahrami@Sun.COM static const Msg tags_auxiliary_cfnp[] = { 7509273SAli.Bahrami@Sun.COM MSG_DT_AUXILIARY_CFNP, MSG_DT_USED_CFNP, 7519273SAli.Bahrami@Sun.COM MSG_DT_FILTER_CFNP 7529273SAli.Bahrami@Sun.COM }; 7539273SAli.Bahrami@Sun.COM static const Msg tags_auxiliary_nf[] = { 7549273SAli.Bahrami@Sun.COM MSG_DT_AUXILIARY_NF, MSG_DT_USED_NF, 7559273SAli.Bahrami@Sun.COM MSG_DT_FILTER_NF 7563492Sab196087 }; 7579273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_auxiliary_cf = { 7589273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_AUXILIARY, tags_auxiliary_cf) }; 7599273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_auxiliary_cfnp = { 7609273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_AUXILIARY, tags_auxiliary_cfnp) }; 7619273SAli.Bahrami@Sun.COM static const conv_ds_msg_t ds_auxiliary_nf = { 7629273SAli.Bahrami@Sun.COM CONV_DS_MSG_INIT(DT_AUXILIARY, tags_auxiliary_nf) }; 7633492Sab196087 7643492Sab196087 7659273SAli.Bahrami@Sun.COM static const conv_ds_t *retarr[MAX_RET]; 7669273SAli.Bahrami@Sun.COM 7679273SAli.Bahrami@Sun.COM int ndx = 0; 7689273SAli.Bahrami@Sun.COM int fmt_osabi = CONV_TYPE_FMT_ALT(fmt_flags); 7699273SAli.Bahrami@Sun.COM int mach_sparc, osabi_solaris, osabi_linux; 7709273SAli.Bahrami@Sun.COM 7713492Sab196087 7720Sstevel@tonic-gate 7739273SAli.Bahrami@Sun.COM osabi_solaris = (osabi == ELFOSABI_NONE) || 7749273SAli.Bahrami@Sun.COM (osabi == ELFOSABI_SOLARIS) || (osabi == CONV_OSABI_ALL); 7759273SAli.Bahrami@Sun.COM osabi_linux = (osabi == ELFOSABI_LINUX) || (osabi == CONV_OSABI_ALL); 7769273SAli.Bahrami@Sun.COM mach_sparc = (mach == EM_SPARC) || (mach == EM_SPARCV9) || 7779273SAli.Bahrami@Sun.COM (mach == EM_SPARC32PLUS) || (mach == CONV_MACH_ALL); 7780Sstevel@tonic-gate 7793492Sab196087 /* 7809273SAli.Bahrami@Sun.COM * Fill in retarr with the descriptors for the messages that 7819273SAli.Bahrami@Sun.COM * apply to the current osabi. Note that we order these items such 7829273SAli.Bahrami@Sun.COM * that the more common are placed at the beginning, and the less 7839273SAli.Bahrami@Sun.COM * likely at the end. This should speed the common case. 7849273SAli.Bahrami@Sun.COM * 7859273SAli.Bahrami@Sun.COM * Note that the CFNP and DMP styles are very similar, so they 7869273SAli.Bahrami@Sun.COM * are combined in 'default', and fmt_osabi is consulted when there 7879273SAli.Bahrami@Sun.COM * are differences. 7883492Sab196087 */ 7899273SAli.Bahrami@Sun.COM switch (fmt_osabi) { 7909273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_CF: 7919273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_null_cf); 7929273SAli.Bahrami@Sun.COM if (osabi_solaris) 7939273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sunw_auxiliary_cf); 7949273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_checksum_cf); 7959273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_config_cf); 7969273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_versym_cf); 7979273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_relacount_cf); 7989273SAli.Bahrami@Sun.COM if (osabi_solaris) { 7999273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_auxiliary_cf); 8009273SAli.Bahrami@Sun.COM if (mach_sparc) { 8019273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sparc_reg_cf); 8029273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sdreg_cf); 8039273SAli.Bahrami@Sun.COM } 8049273SAli.Bahrami@Sun.COM } 8059273SAli.Bahrami@Sun.COM if (osabi_linux) { 8069273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_gnu_prelinked_cf); 8079273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_gnu_hash_cf); 8089273SAli.Bahrami@Sun.COM } 8099273SAli.Bahrami@Sun.COM break; 8103492Sab196087 8119273SAli.Bahrami@Sun.COM case CONV_FMT_ALT_NF: 8129273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_null_nf); 8139273SAli.Bahrami@Sun.COM if (osabi_solaris) 8149273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sunw_auxiliary_nf); 8159273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_checksum_nf); 8169273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_config_nf); 8179273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_versym_nf); 8189273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_relacount_nf); 8199273SAli.Bahrami@Sun.COM if (osabi_solaris) { 8209273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_auxiliary_nf); 8219273SAli.Bahrami@Sun.COM if (mach_sparc) { 8229273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sparc_reg_nf); 8239273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sdreg_nf); 8249273SAli.Bahrami@Sun.COM } 8259273SAli.Bahrami@Sun.COM } 8269273SAli.Bahrami@Sun.COM if (osabi_linux) { 8279273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_gnu_prelinked_nf); 8289273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_gnu_hash_nf); 8299273SAli.Bahrami@Sun.COM } 8309273SAli.Bahrami@Sun.COM break; 8319273SAli.Bahrami@Sun.COM default: 8329273SAli.Bahrami@Sun.COM /* 8339273SAli.Bahrami@Sun.COM * The default style for the generic range is CFNP, 8349273SAli.Bahrami@Sun.COM * while dump has a couple of different strings. 8359273SAli.Bahrami@Sun.COM */ 8363492Sab196087 8379273SAli.Bahrami@Sun.COM retarr[ndx++] = (fmt_osabi == CONV_FMT_ALT_DUMP) ? 8389273SAli.Bahrami@Sun.COM CONV_DS_ADDR(ds_null_dmp) : CONV_DS_ADDR(ds_null_cfnp); 8399273SAli.Bahrami@Sun.COM if (osabi_solaris) 8409273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sunw_auxiliary_cfnp); 8419273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_checksum_cfnp); 8429273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_config_cfnp); 8439273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_versym_cfnp); 8449273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_relacount_cfnp); 8459273SAli.Bahrami@Sun.COM if (osabi_solaris) { 8469273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_auxiliary_cfnp); 8479273SAli.Bahrami@Sun.COM if (mach_sparc) { 8489273SAli.Bahrami@Sun.COM /* 8499273SAli.Bahrami@Sun.COM * The default style for DT_SPARC_REGISTER 8509273SAli.Bahrami@Sun.COM * is the dump style, which omits the 'SPARC_'. 8519273SAli.Bahrami@Sun.COM * CFNP keeps the prefix. 8529273SAli.Bahrami@Sun.COM */ 8539273SAli.Bahrami@Sun.COM retarr[ndx++] = 8549273SAli.Bahrami@Sun.COM (fmt_osabi == CONV_FMT_ALT_CFNP) ? 8559273SAli.Bahrami@Sun.COM CONV_DS_ADDR(ds_sparc_reg_cfnp) : 8569273SAli.Bahrami@Sun.COM CONV_DS_ADDR(ds_sparc_reg_dmp); 8579273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_sdreg_cfnp); 8589273SAli.Bahrami@Sun.COM } 8599273SAli.Bahrami@Sun.COM } 8609273SAli.Bahrami@Sun.COM if (osabi_linux) { 8619273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_gnu_prelinked_cfnp); 8629273SAli.Bahrami@Sun.COM retarr[ndx++] = CONV_DS_ADDR(ds_gnu_hash_cfnp); 8639273SAli.Bahrami@Sun.COM } 8649273SAli.Bahrami@Sun.COM break; 8659273SAli.Bahrami@Sun.COM } 8663492Sab196087 8679273SAli.Bahrami@Sun.COM retarr[ndx++] = NULL; 8689273SAli.Bahrami@Sun.COM assert(ndx <= MAX_RET); 8699273SAli.Bahrami@Sun.COM return (retarr); 8700Sstevel@tonic-gate } 871280Srie 8729273SAli.Bahrami@Sun.COM conv_iter_ret_t 8739273SAli.Bahrami@Sun.COM conv_iter_dyn_tag(conv_iter_osabi_t osabi, Half mach, 8749273SAli.Bahrami@Sun.COM Conv_fmt_flags_t fmt_flags, conv_iter_cb_t func, void *uvalue) 8759273SAli.Bahrami@Sun.COM { 8769273SAli.Bahrami@Sun.COM return (conv_iter_ds(osabi, mach, 8779273SAli.Bahrami@Sun.COM conv_dyn_tag_strings(osabi, mach, fmt_flags), func, uvalue)); 8789273SAli.Bahrami@Sun.COM } 8799273SAli.Bahrami@Sun.COM 8809273SAli.Bahrami@Sun.COM 8819273SAli.Bahrami@Sun.COM #define BINDTSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \ 8822352Sab196087 MSG_BND_NEEDED_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 8832352Sab196087 MSG_BND_REFER_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 8842352Sab196087 MSG_BND_FILTER_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 8854734Sab196087 CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 8864734Sab196087 8874734Sab196087 /* 8884734Sab196087 * Ensure that Conv_bnd_type_buf_t is large enough: 8894734Sab196087 * 8904734Sab196087 * BINDTSZ is the real minimum size of the buffer required by conv_bnd_type(). 8914734Sab196087 * However, Conv_bnd_type_buf_t uses CONV_BND_TYPE_BUFSIZE to set the 8924734Sab196087 * buffer size. We do things this way because the definition of BINDTSZ uses 8934734Sab196087 * information that is not available in the environment of other programs 8944734Sab196087 * that include the conv.h header file. 8954734Sab196087 */ 8965152Sab196087 #if (CONV_BND_TYPE_BUFSIZE != BINDTSZ) && !defined(__lint) 8975152Sab196087 #define REPORT_BUFSIZE BINDTSZ 8985152Sab196087 #include "report_bufsize.h" 8995152Sab196087 #error "CONV_BND_TYPE_BUFSIZE does not match BINDTSZ" 9004734Sab196087 #endif 901280Srie 902280Srie const char * 9034734Sab196087 conv_bnd_type(uint_t flags, Conv_bnd_type_buf_t *bnd_type_buf) 904280Srie { 9059273SAli.Bahrami@Sun.COM static const Val_desc vda[] = { 9069273SAli.Bahrami@Sun.COM { BND_NEEDED, MSG_BND_NEEDED }, 9079273SAli.Bahrami@Sun.COM { BND_REFER, MSG_BND_REFER }, 9089273SAli.Bahrami@Sun.COM { BND_FILTER, MSG_BND_FILTER }, 9091618Srie { 0, 0 } 9101618Srie }; 9114734Sab196087 static CONV_EXPN_FIELD_ARG conv_arg = { 9129273SAli.Bahrami@Sun.COM NULL, sizeof (bnd_type_buf->buf) }; 913280Srie 9141618Srie if (flags == 0) 9151618Srie return (MSG_ORIG(MSG_STR_EMPTY)); 916280Srie 9174734Sab196087 conv_arg.buf = bnd_type_buf->buf; 9182352Sab196087 conv_arg.oflags = conv_arg.rflags = flags; 9199273SAli.Bahrami@Sun.COM (void) conv_expn_field(&conv_arg, vda, 0); 9201618Srie 9214734Sab196087 return ((const char *)bnd_type_buf->buf); 922280Srie } 923280Srie 9241824Srie /* 9251824Srie * Note, conv_bnd_obj() is called with either: 9261824Srie * LML_FLG_OBJADDED (possibly with LML_FLG_OBJREEVAL added), or 9271824Srie * LML_FLG_OBJDELETED, or 9281824Srie * LML_FLG_ATEXIT. 9291824Srie */ 9302352Sab196087 #define BINDOSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \ 9312352Sab196087 MSG_BND_ADDED_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 9322352Sab196087 MSG_BND_REEVAL_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \ 9334734Sab196087 CONV_INV_BUFSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE 9344734Sab196087 9354734Sab196087 /* 9364734Sab196087 * Ensure that Conv_bnd_obj_buf_t is large enough: 9374734Sab196087 * 9384734Sab196087 * BINDOSZ is the real minimum size of the buffer required by conv_bnd_obj(). 9394734Sab196087 * However, Conv_bnd_obj_buf_t uses CONV_BND_OBJ_BUFSIZE to set the 9404734Sab196087 * buffer size. We do things this way because the definition of BINDOSZ uses 9414734Sab196087 * information that is not available in the environment of other programs 9424734Sab196087 * that include the conv.h header file. 9434734Sab196087 */ 9445152Sab196087 #if (CONV_BND_OBJ_BUFSIZE != BINDOSZ) && !defined(__lint) 9455152Sab196087 #define REPORT_BUFSIZE BINDOSZ 9465152Sab196087 #include "report_bufsize.h" 9475152Sab196087 #error "CONV_BND_OBJ_BUFSIZE does not match BINDOSZ" 9484734Sab196087 #endif 949280Srie 950280Srie const char * 9514734Sab196087 conv_bnd_obj(uint_t flags, Conv_bnd_obj_buf_t *bnd_obj_buf) 952280Srie { 9539273SAli.Bahrami@Sun.COM static const Val_desc vda[] = { 9549273SAli.Bahrami@Sun.COM { LML_FLG_OBJADDED, MSG_BND_ADDED }, 9559273SAli.Bahrami@Sun.COM { LML_FLG_OBJREEVAL, MSG_BND_REEVAL }, 9569273SAli.Bahrami@Sun.COM { LML_FLG_OBJDELETED, MSG_BND_DELETED }, 9579273SAli.Bahrami@Sun.COM { LML_FLG_ATEXIT, MSG_BND_ATEXIT }, 9581618Srie { 0, 0 } 9591618Srie }; 9604734Sab196087 static CONV_EXPN_FIELD_ARG conv_arg = { 9619273SAli.Bahrami@Sun.COM NULL, sizeof (bnd_obj_buf->buf) }; 9621618Srie 9631824Srie if ((flags & (LML_FLG_OBJADDED | LML_FLG_OBJREEVAL | 9641824Srie LML_FLG_OBJDELETED | LML_FLG_ATEXIT)) == 0) 9651824Srie return (MSG_ORIG(MSG_BND_REVISIT)); 966280Srie 967280Srie /* 9681618Srie * Note, we're not worried about unknown flags for this family, only 9692352Sab196087 * the selected flags are of interest, so we leave conv_arg.rflags 9702352Sab196087 * set to 0. 971280Srie */ 9724734Sab196087 conv_arg.buf = bnd_obj_buf->buf; 9732352Sab196087 conv_arg.oflags = flags; 9749273SAli.Bahrami@Sun.COM (void) conv_expn_field(&conv_arg, vda, 0); 975280Srie 9764734Sab196087 return ((const char *)bnd_obj_buf->buf); 977280Srie } 978