xref: /titanic_50/usr/src/cmd/sgs/libconv/common/llib-lconv (revision f7209cf2d2e114162cab4b5252c05118a6b7e54a)
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 2006 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 */
41void		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);
54Isa_desc	*conv_isalist(void);
55const char	*conv_lddstub(int);
56const char	*conv_seg_flags(Half);
57int		conv_sys_eclass(void);
58Uts_desc	*conv_uts(void);
59const char	*conv_ver_flags(Half);
60
61/*
62 * Define all class specific routines.
63 */
64const char	*conv32_bnd_obj(uint_t);
65const char	*conv64_bnd_obj(uint_t);
66const char	*conv32_bnd_type(uint_t);
67const char	*conv64_bnd_type(uint_t);
68const char	*conv32_cap_tag(Elf32_Word);
69const char	*conv64_cap_tag(Elf64_Xword);
70const char	*conv32_cap_val(Elf32_Word, Elf32_Word, Half);
71const char	*conv64_cap_val(Elf64_Xword, Elf64_Xword, Half);
72const char	*conv32_cap_val_hw1(Elf32_Word, Half);
73const char	*conv64_cap_val_hw1(Elf64_Xword, Half);
74const char	*conv32_cap_val_sf1(Elf32_Word, Half);
75const char	*conv64_cap_val_sf1(Elf64_Xword, Half);
76const char	*conv32_dyn_flag1(Elf32_Word);
77const char	*conv64_dyn_flag1(Elf64_Xword);
78const char	*conv32_dyn_flag(Elf32_Word, int);
79const char	*conv64_dyn_flag(Elf64_Xword, int);
80const char	*conv32_dyn_posflag1(Elf32_Word, int);
81const char	*conv64_dyn_posflag1(Elf64_Xword, int);
82const char	*conv32_dyn_tag(Elf32_Word, Elf32_Half, int);
83const char	*conv64_dyn_tag(Elf64_Xword, Elf64_Half, int);
84const char	*conv32_dyn_feature1(Elf32_Word, int);
85const char	*conv64_dyn_feature1(Elf64_Xword, int);
86const char	*conv32_ehdr_class(uchar_t, int);
87const char	*conv64_ehdr_class(uchar_t, int);
88const char	*conv32_ehdr_data(uchar_t, int);
89const char	*conv64_ehdr_data(uchar_t, int);
90const char	*conv32_ehdr_flags(Elf32_Half, Elf32_Word);
91const char	*conv64_ehdr_flags(Elf64_Half, Elf64_Word);
92const char	*conv32_ehdr_mach(Elf32_Half, int);
93const char	*conv64_ehdr_mach(Elf64_Half, int);
94const char	*conv32_ehdr_type(Elf32_Half, int);
95const char	*conv64_ehdr_type(Elf64_Half, int);
96const char	*conv32_ehdr_vers(Elf32_Word, int);
97const char	*conv64_ehdr_vers(Elf64_Word, int);
98const char	*conv32_invalid_val(char *, size_t, Elf32_Word, int);
99const char	*conv64_invalid_val(char *, size_t, Elf64_Xword, int);
100const char	*conv32_phdr_flags(Word);
101const char	*conv64_phdr_flags(Word);
102const char	*conv32_phdr_type(Elf32_Half, Word);
103const char	*conv64_phdr_type(Elf64_Half, Word);
104const char	*conv32_reject_desc(Rej_desc *);
105const char	*conv64_reject_desc(Rej_desc *);
106const char	*conv32_reloc_type(Half, Word, int);
107const char	*conv64_reloc_type(Half, Word, int);
108const char	*conv32_reloc_386_type(Word, int);
109const char	*conv64_reloc_386_type(Word, int);
110const char	*conv32_reloc_amd64_type(Word, int);
111const char	*conv64_reloc_amd64_type(Word, int);
112const char	*conv32_reloc_SPARC_type(Word, int);
113const char	*conv64_reloc_SPARC_type(Word, int);
114const char	*conv32_sec_flags(Elf32_Word);
115const char	*conv64_sec_flags(Elf64_Xword);
116const char	*conv32_sec_info(Elf32_Word, Elf32_Word);
117const char	*conv64_sec_info(Elf64_Word, Elf64_Xword);
118const char	*conv32_sec_type(Elf32_Half, Elf32_Word, int);
119const char	*conv64_sec_type(Elf64_Half, Elf64_Word, int);
120const char	*conv32_sym_info_bind(uchar_t, int);
121const char	*conv64_sym_info_bind(uchar_t, int);
122const char	*conv32_sym_info_type(Elf32_Half, uchar_t, int);
123const char	*conv64_sym_info_type(Elf64_Half, uchar_t, int);
124const char	*conv32_sym_shndx(Elf32_Half);
125const char	*conv64_sym_shndx(Elf64_Half);
126const char	*conv32_sym_other(uchar_t);
127const char	*conv64_sym_other(uchar_t);
128const char	*conv32_sym_value(Elf32_Half, uchar_t, Elf32_Addr);
129const char	*conv64_sym_value(Elf64_Half, uchar_t, Elf64_Addr);
130const char	*conv32_sym_SPARC_value(Elf32_Addr, int);
131const char	*conv64_sym_SPARC_value(Elf64_Addr, int);
132