xref: /titanic_44/usr/src/cmd/sgs/libconv/common/llib-lconv (revision a237e38e9161f0acd6451439d4a7dd597e66291d)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24 * Use is subject to license terms.
25 */
26/* LINTLIBRARY */
27/* PROTOLIB1 */
28
29#pragma ident	"%Z%%M%	%I%	%E% SMI"
30
31#include	<stdlib.h>
32#include	<libelf.h>
33#include	<sys/machelf.h>
34#include	<sgs.h>
35#include	<libld.h>
36#include	<conv.h>
37
38/*
39 * Define all generic interfaces.
40 */
41uchar_t		conv_check_native(char **, char **);
42const char      *conv_config_feat(int);
43const char	*conv_config_obj(ushort_t);
44const char	*conv_config_upm(const char *, const char *, const char *,
45		    size_t);
46const char	*conv_def_tag(Symref);
47const char	*conv_demangle_name(const char *);
48const char	*conv_dl_flag(int, int);
49const char	*conv_dl_mode(int, int);
50const char	*conv_dwarf_ehe(uint_t);
51const char	*conv_elfdata_type(Elf_Type);
52int		conv_expn_field(CONV_EXPN_FIELD_ARG *);
53const char	*conv_grphdl_flags(uint_t);
54const char	*conv_grpdesc_flags(uint_t);
55Isa_desc	*conv_isalist(void);
56const char	*conv_lddstub(int);
57const char	*conv_seg_flags(Half);
58int		conv_sys_eclass(void);
59Uts_desc	*conv_uts(void);
60const char	*conv_ver_flags(Half);
61const char	*conv_ver_index(Versym verndx);
62
63/*
64 * Define all class specific routines.
65 */
66const char	*conv32_bnd_obj(uint_t);
67const char	*conv64_bnd_obj(uint_t);
68const char	*conv32_bnd_type(uint_t);
69const char	*conv64_bnd_type(uint_t);
70const char	*conv32_cap_tag(Elf32_Word);
71const char	*conv64_cap_tag(Elf64_Xword);
72const char	*conv32_cap_val(Elf32_Word, Elf32_Word, Half);
73const char	*conv64_cap_val(Elf64_Xword, Elf64_Xword, Half);
74const char	*conv32_cap_val_hw1(Elf32_Word, Half);
75const char	*conv64_cap_val_hw1(Elf64_Xword, Half);
76const char	*conv32_cap_val_sf1(Elf32_Word, Half);
77const char	*conv64_cap_val_sf1(Elf64_Xword, Half);
78const char	*conv32_dyn_flag1(Elf32_Word);
79const char	*conv64_dyn_flag1(Elf64_Xword);
80const char	*conv32_dyn_flag(Elf32_Word, int);
81const char	*conv64_dyn_flag(Elf64_Xword, int);
82const char	*conv32_dyn_posflag1(Elf32_Word, int);
83const char	*conv64_dyn_posflag1(Elf64_Xword, int);
84const char	*conv32_dyn_tag(Elf32_Word, Elf32_Half, int);
85const char	*conv64_dyn_tag(Elf64_Xword, Elf64_Half, int);
86const char	*conv32_dyn_feature1(Elf32_Word, int);
87const char	*conv64_dyn_feature1(Elf64_Xword, int);
88const char	*conv32_ehdr_class(uchar_t, int);
89const char	*conv64_ehdr_class(uchar_t, int);
90const char	*conv32_ehdr_data(uchar_t, int);
91const char	*conv64_ehdr_data(uchar_t, int);
92const char	*conv32_ehdr_flags(Elf32_Half, Elf32_Word);
93const char	*conv64_ehdr_flags(Elf64_Half, Elf64_Word);
94const char	*conv32_ehdr_mach(Elf32_Half, int);
95const char	*conv64_ehdr_mach(Elf64_Half, int);
96const char	*conv32_ehdr_type(Elf32_Half, int);
97const char	*conv64_ehdr_type(Elf64_Half, int);
98const char	*conv32_ehdr_vers(Elf32_Word, int);
99const char	*conv64_ehdr_vers(Elf64_Word, int);
100const char	*conv32_invalid_val(char *, size_t, Elf32_Word, int);
101const char	*conv64_invalid_val(char *, size_t, Elf64_Xword, int);
102const char	*conv32_phdr_flags(Word);
103const char	*conv64_phdr_flags(Word);
104const char	*conv32_phdr_type(Elf32_Half, Word);
105const char	*conv64_phdr_type(Elf64_Half, Word);
106const char	*conv32_reject_desc(Rej_desc *);
107const char	*conv64_reject_desc(Rej_desc *);
108const char	*conv32_reloc_type(Half, Word, int);
109const char	*conv64_reloc_type(Half, Word, int);
110const char	*conv32_reloc_386_type(Word, int);
111const char	*conv64_reloc_386_type(Word, int);
112const char	*conv32_reloc_amd64_type(Word, int);
113const char	*conv64_reloc_amd64_type(Word, int);
114const char	*conv32_reloc_SPARC_type(Word, int);
115const char	*conv64_reloc_SPARC_type(Word, int);
116const char	*conv32_sec_flags(Elf32_Word);
117const char	*conv64_sec_flags(Elf64_Xword);
118const char	*conv32_sec_linkinfo(Elf32_Word, Elf32_Word, Conv_inv_buf_t);
119const char	*conv64_sec_linkinfo(Elf64_Word, Elf64_Xword, Conv_inv_buf_t);
120const char	*conv32_sec_type(Elf32_Half, Elf32_Word, int);
121const char	*conv64_sec_type(Elf64_Half, Elf64_Word, int);
122const char	*conv32_sym_info_bind(uchar_t, int);
123const char	*conv64_sym_info_bind(uchar_t, int);
124const char	*conv32_sym_info_type(Elf32_Half, uchar_t, int);
125const char	*conv64_sym_info_type(Elf64_Half, uchar_t, int);
126const char	*conv32_sym_shndx(Elf32_Half);
127const char	*conv64_sym_shndx(Elf64_Half);
128const char	*conv32_sym_other(uchar_t);
129const char	*conv64_sym_other(uchar_t);
130const char	*conv32_sym_value(Elf32_Half, uchar_t, Elf32_Addr);
131const char	*conv64_sym_value(Elf64_Half, uchar_t, Elf64_Addr);
132const char	*conv32_sym_SPARC_value(Elf32_Addr, int);
133const char	*conv64_sym_SPARC_value(Elf64_Addr, int);
134