xref: /titanic_52/usr/src/cmd/sgs/libconv/common/llib-lconv (revision 2020b2b6df0384feda1732f65486c4604fbf5bea)
17c478bd9Sstevel@tonic-gate/*
27c478bd9Sstevel@tonic-gate * CDDL HEADER START
37c478bd9Sstevel@tonic-gate *
47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
55aefb655Srie * Common Development and Distribution License (the "License").
65aefb655Srie * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate *
87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate * and limitations under the License.
127c478bd9Sstevel@tonic-gate *
137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate *
197c478bd9Sstevel@tonic-gate * CDDL HEADER END
207c478bd9Sstevel@tonic-gate */
215aefb655Srie
227c478bd9Sstevel@tonic-gate/*
23*2020b2b6SRod Evans * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
247c478bd9Sstevel@tonic-gate */
257c478bd9Sstevel@tonic-gate/* LINTLIBRARY */
267c478bd9Sstevel@tonic-gate/* PROTOLIB1 */
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gate#include	<stdlib.h>
297c478bd9Sstevel@tonic-gate#include	<libelf.h>
30ba2be530Sab196087#include	<_machelf.h>
315aefb655Srie#include	<sgs.h>
325aefb655Srie#include	<libld.h>
335aefb655Srie#include	<conv.h>
347c478bd9Sstevel@tonic-gate
355aefb655Srie/*
364f680cc6SAli Bahrami * Generic miscellaneous interfaces
375aefb655Srie */
387010c12aSrieuchar_t		conv_check_native(char **, char **);
394f680cc6SAli Bahramiconst char	*conv_lddstub(int);
404f680cc6SAli Bahramiint		conv_sys_eclass(void);
41e23c41c9SAli Bahramiint		conv_strproc_isspace(int);
42e23c41c9SAli Bahramichar		*conv_strproc_trim(char *);
43e23c41c9SAli BahramiBoolean		conv_strproc_extract_value(char *, size_t, int, const char **);
44e23c41c9SAli Bahrami
454f680cc6SAli Bahrami
464f680cc6SAli Bahrami/*
474f680cc6SAli Bahrami * Generic core formatting and iteration functionality
484f680cc6SAli Bahrami */
494f680cc6SAli Bahramiconv_iter_ret_t	_conv_iter_ds(conv_iter_osabi_t, Half, const conv_ds_t **,
504f680cc6SAli Bahrami		    conv_iter_cb_t, void *, const char *);
514f680cc6SAli Bahramiconv_iter_ret_t	_conv_iter_ds_msg(const conv_ds_msg_t *, conv_iter_cb_t,
524f680cc6SAli Bahrami		    void *, const char *);
534f680cc6SAli Bahramiconv_iter_ret_t	_conv_iter_msgarr(Conv_elfvalue_t, const Msg *, size_t,
544f680cc6SAli Bahrami		    conv_iter_cb_t, void *, const char *);
554f680cc6SAli Bahramiconv_iter_ret_t	_conv_iter_vd(const Val_desc *, conv_iter_cb_t,
564f680cc6SAli Bahrami		    void *, const char *);
574f680cc6SAli Bahramiconv_iter_ret_t	_conv_iter_vd2(conv_iter_osabi_t, Half, const Val_desc2 *,
584f680cc6SAli Bahrami		    conv_iter_cb_t, void *, const char *);
594f680cc6SAli Bahramiint		conv_iter_strtol_init(const char *, conv_strtol_uvalue_t *);
604f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_strtol(const char *, Conv_elfvalue_t, void *);
614f680cc6SAli Bahramiconst char	*_conv_map2str(Conv_inv_buf_t *, Conv_elfvalue_t,
624f680cc6SAli Bahrami		    Conv_fmt_flags_t, size_t, const Msg *, const char *);
634f680cc6SAli Bahramiconst char	*_conv_map_ds(uchar_t, Half, Conv_elfvalue_t,
644f680cc6SAli Bahrami		    const conv_ds_t **, Conv_fmt_flags_t, Conv_inv_buf_t *,
654f680cc6SAli Bahrami		    const char *);
664f680cc6SAli Bahramiconst char	*_conv_map_vd2str(Conv_inv_buf_t *, Conv_elfvalue_t,
674f680cc6SAli Bahrami		    Conv_fmt_flags_t, const Val_desc *, const char *);
684f680cc6SAli Bahramiconst char	*_conv_map_vd22str(Conv_inv_buf_t *, uchar_t, Half,
694f680cc6SAli Bahrami		    Conv_elfvalue_t, Conv_fmt_flags_t, const Val_desc2 *,
704f680cc6SAli Bahrami		    const char *);
714f680cc6SAli Bahrami
724f680cc6SAli Bahrami/*
734f680cc6SAli Bahrami * Generic formatting interfaces.
744f680cc6SAli Bahrami */
754f680cc6SAli Bahramiconst char	*conv_bnd_obj(uint_t, Conv_bnd_obj_buf_t *);
764f680cc6SAli Bahramiconst char	*conv_bnd_type(uint_t, Conv_bnd_type_buf_t *);
77de777a60Sab196087const char	*conv_config_feat(int, Conv_config_feat_buf_t *);
78de777a60Sab196087const char	*conv_config_obj(ushort_t, Conv_config_obj_buf_t *);
794f680cc6SAli Bahramiconst char	*conv_config_upm(const char *, const char *,
804f680cc6SAli Bahrami		    const char *, size_t);
814f680cc6SAli Bahramiconst char	*conv_cnote_auxv_af(Word, Conv_fmt_flags_t,
824f680cc6SAli Bahrami		    Conv_cnote_auxv_af_buf_t *);
834f680cc6SAli Bahramiconst char	*conv_cnote_auxv_type(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
844f680cc6SAli Bahramiconst char	*conv_cnote_cc_content(Lword, Conv_fmt_flags_t,
854f680cc6SAli Bahrami		    Conv_cnote_cc_content_buf_t *);
864f680cc6SAli Bahramiconst char	*conv_cnote_errno(int, Conv_fmt_flags_t, Conv_inv_buf_t *);
874f680cc6SAli Bahramiconst char	*conv_cnote_fault(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
884f680cc6SAli Bahramiconst char	*conv_cnote_fltset(uint32_t *, int, Conv_fmt_flags_t,
894f680cc6SAli Bahrami		    Conv_cnote_fltset_buf_t *);
904f680cc6SAli Bahramiconst char	*conv_cnote_old_pr_flags(int, Conv_fmt_flags_t,
914f680cc6SAli Bahrami		    Conv_cnote_old_pr_flags_buf_t *);
924f680cc6SAli Bahramiconst char	*conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
934f680cc6SAli Bahramiconst char	*conv_cnote_pr_flags(int, Conv_fmt_flags_t,
944f680cc6SAli Bahrami		    Conv_cnote_pr_flags_buf_t *);
954f680cc6SAli Bahramiconst char	*conv_cnote_proc_flag(int, Conv_fmt_flags_t,
964f680cc6SAli Bahrami		    Conv_cnote_proc_flag_buf_t *);
974f680cc6SAli Bahramiconst char	*conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t,
984f680cc6SAli Bahrami		    Conv_inv_buf_t *inv_buf);
994f680cc6SAli Bahramiconst char	*conv_cnote_pr_stype(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
1004f680cc6SAli Bahramiconst char	*conv_cnote_pr_what(short, short, Conv_fmt_flags_t,
1014f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1024f680cc6SAli Bahramiconst char	*conv_cnote_pr_why(short, Conv_fmt_flags_t, Conv_inv_buf_t *);
1034f680cc6SAli Bahramiconst char	*conv_cnote_priv(int, Conv_fmt_flags_t, Conv_inv_buf_t *);
1044f680cc6SAli Bahramiconst char	*conv_cnote_psetid(int, Conv_fmt_flags_t, Conv_inv_buf_t *);
1054f680cc6SAli Bahramiconst char	*conv_cnote_sa_flags(int, Conv_fmt_flags_t,
1064f680cc6SAli Bahrami		    Conv_cnote_sa_flags_buf_t *);
1074f680cc6SAli Bahramiconst char	*conv_cnote_signal(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
1084f680cc6SAli Bahramiconst char	*conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t,
1094f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1104f680cc6SAli Bahramiconst char	*conv_cnote_sigset(uint32_t *, int, Conv_fmt_flags_t,
1114f680cc6SAli Bahrami		    Conv_cnote_sigset_buf_t *);
1124f680cc6SAli Bahramiconst char	*conv_cnote_ss_flags(int, Conv_fmt_flags_t,
1134f680cc6SAli Bahrami		    Conv_cnote_ss_flags_buf_t *);
1144f680cc6SAli Bahramiconst char	*conv_cnote_syscall(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
1154f680cc6SAli Bahramiconst char	*conv_cnote_sysset(uint32_t *, int, Conv_fmt_flags_t,
1164f680cc6SAli Bahrami		    Conv_cnote_sysset_buf_t *);
1174f680cc6SAli Bahramiconst char	*conv_cnote_type(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
118de777a60Sab196087const char	*conv_def_tag(Symref, Conv_inv_buf_t *);
1195aefb655Srieconst char	*conv_demangle_name(const char *);
1204f680cc6SAli Bahramiconst char	*conv_dl_flag(int, Conv_fmt_flags_t, Conv_dl_flag_buf_t *);
12198c080d5SRod Evansconst char	*conv_dl_info(int);
122de777a60Sab196087const char	*conv_dl_mode(int, int, Conv_dl_mode_buf_t *);
1234f680cc6SAli Bahramiconst char	*conv_dwarf_cfa(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *);
124de777a60Sab196087const char	*conv_dwarf_ehe(uint_t, Conv_dwarf_ehe_buf_t *);
1254f680cc6SAli Bahramiconst char	*conv_dwarf_regname(Half, Word, Conv_fmt_flags_t,
1264f680cc6SAli Bahrami		    int *, Conv_inv_buf_t *);
1274f680cc6SAli Bahramiconst char	*conv_ehdr_abivers(uchar_t, Word, Conv_fmt_flags_t,
1284f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1294f680cc6SAli Bahramiconst char	*conv_ehdr_class(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *);
1304f680cc6SAli Bahramiconst char	*conv_ehdr_data(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *);
1314f680cc6SAli Bahramiconst char	*conv_ehdr_flags(Half, Word, Conv_fmt_flags_t,
1324f680cc6SAli Bahrami		    Conv_ehdr_flags_buf_t *);
1334f680cc6SAli Bahramiconst char	*conv_ehdr_mach(Half, Conv_fmt_flags_t, Conv_inv_buf_t *);
1344f680cc6SAli Bahramiconst char	*conv_ehdr_osabi(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *);
1354f680cc6SAli Bahramiconst char	*conv_ehdr_type(uchar_t, Half, Conv_fmt_flags_t,
1364f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1374f680cc6SAli Bahramiconst char	*conv_ehdr_vers(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
138de777a60Sab196087const char	*conv_elfdata_type(Elf_Type, Conv_inv_buf_t *);
13969112eddSAli Bahramiconst char	*conv_ent_flags(ec_flags_t, Conv_ent_flags_buf_t *);
14069112eddSAli Bahramiconst char	*conv_ent_filcmp(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
141de777a60Sab196087const char	*conv_grphdl_flags(uint_t, Conv_grphdl_flags_buf_t *);
142de777a60Sab196087const char	*conv_grpdesc_flags(uint_t, Conv_grpdesc_flags_buf_t *);
143*2020b2b6SRod Evansconst char	*conv_la_activity(uint_t, Conv_fmt_flags_t, Conv_inv_buf_t *);
144*2020b2b6SRod Evansconst char	*conv_la_bind(uint_t, Conv_la_bind_buf_t *);
145*2020b2b6SRod Evansconst char	*conv_la_search(uint_t, Conv_la_search_buf_t *);
146*2020b2b6SRod Evansconst char	*conv_la_symbind(uint_t, Conv_la_symbind_buf_t *);
1477c478bd9Sstevel@tonic-gateIsa_desc	*conv_isalist(void);
14869112eddSAli Bahramiconst char	*conv_mapfile_version(Word, Conv_fmt_flags_t,
14969112eddSAli Bahrami		    Conv_inv_buf_t *);
1504f680cc6SAli Bahramiconst char	*conv_phdr_flags(uchar_t, Word, Conv_fmt_flags_t,
1514f680cc6SAli Bahrami		    Conv_phdr_flags_buf_t *);
1524f680cc6SAli Bahramiconst char	*conv_phdr_type(uchar_t, Half, Word, Conv_fmt_flags_t,
1534f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1544f680cc6SAli Bahramiconst char	*conv_reject_desc(Rej_desc *, Conv_reject_desc_buf_t *,
1554f680cc6SAli Bahrami		    Half mach);
1564f680cc6SAli Bahramiconst char	*conv_reloc_type(Half, Word, Conv_fmt_flags_t,
1574f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1584f680cc6SAli Bahramiconst char	*conv_reloc_type_static(Half, Word, Conv_fmt_flags_t);
1594f680cc6SAli Bahramiconst char	*conv_reloc_386_type(Word, Conv_fmt_flags_t, Conv_inv_buf_t *);
1604f680cc6SAli Bahramiconst char	*conv_reloc_amd64_type(Word, Conv_fmt_flags_t,
1614f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1624f680cc6SAli Bahramiconst char	*conv_reloc_SPARC_type(Word, Conv_fmt_flags_t,
1634f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1644f680cc6SAli Bahramiconst char	*conv_sec_type(uchar_t, Half, Word, Conv_fmt_flags_t,
1654f680cc6SAli Bahrami		    Conv_inv_buf_t *);
166de777a60Sab196087const char	*conv_seg_flags(Half, Conv_seg_flags_buf_t *);
1674f680cc6SAli Bahramivoid		conv_str_to_c_literal(const char *buf, size_t n,
1684f680cc6SAli Bahrami		    Conv_str_to_c_literal_func_t *cb_func, void *uvalue);
1694f680cc6SAli Bahramiconst char	*conv_sym_info_bind(uchar_t, Conv_fmt_flags_t,
1704f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1714f680cc6SAli Bahramiconst char	*conv_sym_info_type(Half, uchar_t, Conv_fmt_flags_t,
1724f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1734f680cc6SAli Bahramiconst char	*conv_sym_shndx(uchar_t, Half, Half, Conv_fmt_flags_t,
1744f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1754f680cc6SAli Bahramiconst char	*conv_sym_other(uchar_t, Conv_inv_buf_t *);
1764f680cc6SAli Bahramiconst char	*conv_sym_other_vis(uchar_t, Conv_fmt_flags_t,
1774f680cc6SAli Bahrami		    Conv_inv_buf_t *);
1784f680cc6SAli Bahramiconst char	*conv_syminfo_boundto(Half, Conv_fmt_flags_t, Conv_inv_buf_t *);
1794f680cc6SAli Bahramiconst char	*conv_syminfo_flags(Half, Conv_fmt_flags_t,
1804f680cc6SAli Bahrami		    Conv_syminfo_flags_buf_t *);
1812017c965SRod Evansconst char	*conv_time(struct timeval *, struct timeval *,
1822017c965SRod Evans		    Conv_time_buf_t *);
1837c478bd9Sstevel@tonic-gateUts_desc	*conv_uts(void);
184090a8d9eSAli Bahramiconst char	*conv_ver_flags(Half, Conv_fmt_flags_t, Conv_ver_flags_buf_t *);
185de777a60Sab196087const char	*conv_ver_index(Versym, int, Conv_inv_buf_t *);
186de777a60Sab196087
1875aefb655Srie
1885aefb655Srie/*
1894f680cc6SAli Bahrami * Generic iteration interfaces.
1904f680cc6SAli Bahrami */
1914f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_cap_tags(Conv_fmt_flags_t, conv_iter_cb_t, void *);
1924f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_cap_val_hw1(Half, Conv_fmt_flags_t,
1934f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
19408278a5eSRod Evansconv_iter_ret_t	conv_iter_cap_val_hw2(Half, Conv_fmt_flags_t,
19508278a5eSRod Evans		    conv_iter_cb_t, void *);
1964f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_cap_val_sf1(Conv_fmt_flags_t, conv_iter_cb_t, void *);
1974f680cc6SAli Bahrami
1984f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_dyn_feature1(Conv_fmt_flags_t,
1994f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2004f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_dyn_flag(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2014f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_dyn_flag1(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2024f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_dyn_posflag1(Conv_fmt_flags_t,
2034f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2044f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_dyn_tag(conv_iter_osabi_t, Half,
2054f680cc6SAli Bahrami		    Conv_fmt_flags_t, conv_iter_cb_t, void *);
2064f680cc6SAli Bahrami
2074f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_abivers(conv_iter_osabi_t,
2084f680cc6SAli Bahrami		    Conv_fmt_flags_t, conv_iter_cb_t, void *);
2094f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_class(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2104f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_data(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2114f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_eident(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2124f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_flags(Half, Conv_fmt_flags_t,
2134f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2144f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_mach(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2154f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_osabi(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2164f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_type(conv_iter_osabi_t, Conv_fmt_flags_t,
2174f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2184f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_ehdr_vers(Conv_fmt_flags_t, conv_iter_cb_t, void *);
2194f680cc6SAli Bahrami
2204f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_phdr_flags(conv_iter_osabi_t,
2214f680cc6SAli Bahrami		    Conv_fmt_flags_t, conv_iter_cb_t, void *);
2224f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_phdr_type(conv_iter_osabi_t, Conv_fmt_flags_t,
2234f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2244f680cc6SAli Bahrami
2254f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_sec_flags(conv_iter_osabi_t, Half,
2264f680cc6SAli Bahrami		    Conv_fmt_flags_t, conv_iter_cb_t, void *);
2274f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_sec_symtab(conv_iter_osabi_t,
2284f680cc6SAli Bahrami		    Conv_fmt_flags_t, conv_iter_cb_t, void *);
2294f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_sec_type(conv_iter_osabi_t, Half,
2304f680cc6SAli Bahrami		    Conv_fmt_flags_t, conv_iter_cb_t, void *);
2314f680cc6SAli Bahrami
2324f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_sym_info_bind(Conv_fmt_flags_t,
2334f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2344f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_sym_other_vis(Conv_fmt_flags_t,
2354f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2364f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_sym_shndx(conv_iter_osabi_t, Half,
2374f680cc6SAli Bahrami		    Conv_fmt_flags_t, conv_iter_cb_t, void *);
2384f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_sym_info_type(Half, Conv_fmt_flags_t,
2394f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2404f680cc6SAli Bahrami
2414f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_syminfo_boundto(Conv_fmt_flags_t,
2424f680cc6SAli Bahrami		    conv_iter_cb_t, void *);
2434f680cc6SAli Bahramiconv_iter_ret_t	conv_iter_syminfo_flags(Conv_fmt_flags_t,
2444f680cc6SAli Bahrami			    conv_iter_cb_t, void *);
2454f680cc6SAli Bahrami
2464f680cc6SAli Bahrami
2474f680cc6SAli Bahrami/*
2484f680cc6SAli Bahrami * ELFCLASS-specific core formatting functionality
2494f680cc6SAli Bahrami */
2504f680cc6SAli Bahramiint		_conv_expn_field(CONV_EXPN_FIELD_ARG *,
2514f680cc6SAli Bahrami		    const Val_desc *, Conv_fmt_flags_t, const char *);
2524f680cc6SAli Bahramiint		_conv_expn_field2(CONV_EXPN_FIELD_ARG *, uchar_t,
2534f680cc6SAli Bahrami		    Half, const Val_desc2 *, Conv_fmt_flags_t, const char *);
2544f680cc6SAli Bahramiconst char	*conv_invalid_val(Conv_inv_buf_t *, Xword, Conv_fmt_flags_t);
2554f680cc6SAli Bahrami
2564f680cc6SAli Bahrami
2574f680cc6SAli Bahrami/*
2585aefb655Srie * Define all class specific routines.
2595aefb655Srie */
2604f680cc6SAli Bahramiconst char	*conv32_cap_tag(Elf32_Word, Conv_fmt_flags_t,
2614f680cc6SAli Bahrami		    Conv_inv_buf_t *);
2624f680cc6SAli Bahramiconst char	*conv64_cap_tag(Elf64_Xword, Conv_fmt_flags_t,
2634f680cc6SAli Bahrami		    Conv_inv_buf_t *);
264de777a60Sab196087const char	*conv32_cap_val(Elf32_Word, Elf32_Word, Half,
26508278a5eSRod Evans		    Conv_fmt_flags_t, Conv_cap_val_buf_t *);
266de777a60Sab196087const char	*conv64_cap_val(Elf64_Xword, Elf64_Xword, Half,
26708278a5eSRod Evans		    Conv_fmt_flags_t, Conv_cap_val_buf_t *);
268d29b2c44Sab196087const char	*conv32_cap_val_hw1(Elf32_Word, Half, Conv_fmt_flags_t,
2694f680cc6SAli Bahrami		    Conv_cap_val_hw1_buf_t *);
27008278a5eSRod Evansconst char	*conv32_cap_val_hw2(Elf32_Word, Half, Conv_fmt_flags_t,
27108278a5eSRod Evans		    Conv_cap_val_hw2_buf_t *);
272d29b2c44Sab196087const char	*conv64_cap_val_hw1(Elf64_Xword, Half, Conv_fmt_flags_t,
2734f680cc6SAli Bahrami		    Conv_cap_val_hw1_buf_t *);
27408278a5eSRod Evansconst char	*conv64_cap_val_hw2(Elf64_Xword, Half, Conv_fmt_flags_t,
27508278a5eSRod Evans		    Conv_cap_val_hw2_buf_t *);
276d29b2c44Sab196087const char	*conv32_cap_val_sf1(Elf32_Word, Half, Conv_fmt_flags_t,
2774f680cc6SAli Bahrami		    Conv_cap_val_sf1_buf_t *);
278d29b2c44Sab196087const char	*conv64_cap_val_sf1(Elf64_Xword, Half, Conv_fmt_flags_t,
2794f680cc6SAli Bahrami		    Conv_cap_val_sf1_buf_t *);
280d29b2c44Sab196087const char	*conv32_dyn_flag1(Elf32_Word, Conv_fmt_flags_t,
2814f680cc6SAli Bahrami		    Conv_dyn_flag1_buf_t *);
282d29b2c44Sab196087const char	*conv64_dyn_flag1(Elf64_Xword, Conv_fmt_flags_t,
2834f680cc6SAli Bahrami		    Conv_dyn_flag1_buf_t *);
2844f680cc6SAli Bahramiconst char	*conv32_dyn_flag(Elf32_Word, int, Conv_dyn_flag_buf_t *);
2854f680cc6SAli Bahramiconst char	*conv64_dyn_flag(Elf64_Xword, int, Conv_dyn_flag_buf_t *);
286de777a60Sab196087const char	*conv32_dyn_posflag1(Elf32_Word, int,
2874f680cc6SAli Bahrami		    Conv_dyn_posflag1_buf_t *);
288de777a60Sab196087const char	*conv64_dyn_posflag1(Elf64_Xword, int,
2894f680cc6SAli Bahrami		    Conv_dyn_posflag1_buf_t *);
2904f680cc6SAli Bahramiconst char	*conv32_dyn_tag(Elf32_Word, uchar_t, Elf32_Half,
2914f680cc6SAli Bahrami		    Conv_fmt_flags_t, Conv_inv_buf_t *);
2924f680cc6SAli Bahramiconst char	*conv64_dyn_tag(Elf64_Xword, uchar_t, Elf64_Half,
2934f680cc6SAli Bahrami		    Conv_fmt_flags_t, Conv_inv_buf_t *);
294de777a60Sab196087const char	*conv32_dyn_feature1(Elf32_Word, int,
2954f680cc6SAli Bahrami		    Conv_dyn_feature1_buf_t *);
296de777a60Sab196087const char	*conv64_dyn_feature1(Elf64_Xword, int,
2974f680cc6SAli Bahrami		    Conv_dyn_feature1_buf_t *);
2984f680cc6SAli Bahramiconst char	*conv32_sec_flags(uchar_t, Half, Elf32_Word, Conv_fmt_flags_t,
2994f680cc6SAli Bahrami		    Conv_sec_flags_buf_t *);
3004f680cc6SAli Bahramiconst char	*conv64_sec_flags(uchar_t, Half, Elf64_Xword, Conv_fmt_flags_t,
3014f680cc6SAli Bahrami		    Conv_sec_flags_buf_t *);
302de777a60Sab196087const char	*conv32_sec_linkinfo(Elf32_Word, Elf32_Word,
3034f680cc6SAli Bahrami		    Conv_inv_buf_t *);
304de777a60Sab196087const char	*conv64_sec_linkinfo(Elf64_Word, Elf64_Xword,
3054f680cc6SAli Bahrami		    Conv_inv_buf_t *);
306de777a60Sab196087const char	*conv32_sym_value(Elf32_Half, uchar_t, Elf32_Addr,
3074f680cc6SAli Bahrami		    Conv_inv_buf_t *);
308de777a60Sab196087const char	*conv64_sym_value(Elf64_Half, uchar_t, Elf64_Addr,
3094f680cc6SAli Bahrami		    Conv_inv_buf_t *);
3104f680cc6SAli Bahramiconst char	*conv32_sym_SPARC_value(Elf32_Addr, int, Conv_inv_buf_t *);
3114f680cc6SAli Bahramiconst char	*conv64_sym_SPARC_value(Elf64_Addr, int, Conv_inv_buf_t *);
312