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