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.
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.
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]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
31 * Local include file for conversion library.
40 * Some format strings differ depending on whether they are used for 32-bit
44 #define MSG_GBL_FMT_DEC MSG_GBL_FMT_DEC_64
45 #define MSG_GBL_FMT_DECS MSG_GBL_FMT_DECS_64
46 #define MSG_GBL_FMT_HEX MSG_GBL_FMT_HEX_64
47 #define MSG_GBL_FMT_HEXS MSG_GBL_FMT_HEXS_64
49 #define MSG_SYM_FMT_VAL MSG_SYM_FMT_VAL_64
51 #define MSG_GBL_FMT_DEC MSG_GBL_FMT_DEC_32
52 #define MSG_GBL_FMT_DECS MSG_GBL_FMT_DECS_32
53 #define MSG_GBL_FMT_HEX MSG_GBL_FMT_HEX_32
54 #define MSG_GBL_FMT_HEXS MSG_GBL_FMT_HEXS_32
56 #define MSG_SYM_FMT_VAL MSG_SYM_FMT_VAL_32
61 * There are routines in libconv that are built once for each ELFCLASS
62 * because they are formatting Xword values. However, all ELF constants
63 * lie in 32-bit ranges, due to the need be usable for ELFCLASS32. Hence,
64 * the value of the ELFCLASS64 support here is purely to detect unexpected
65 * garbage values above the 32-bit range.
67 * The CONV_XWORD_64TEST() macro tests the upper half of an ELFCLASS64 Xword,
68 * and formats the value in hex if non-zero bits are seen. For ELFCLASS32,
72 #define CONV_XWORD_64TEST(_value, _fmt_flags, _inv_buf) \
73 if (_value & 0xffffffff00000000) \
74 return (conv_invalid_val(_inv_buf, _value, _fmt_flags))
76 #define CONV_XWORD_64TEST(_value, _fmt_flags, _inv_buf)
80 /* # of elements in an array */
81 #define ARRAY_NELTS(arr) (sizeof (arr) / sizeof (*arr))
84 * Functions intended for use inter-file, within libconv only
86 extern const conv_ds_t
**conv_cap_tag_strings(Conv_fmt_flags_t
);
87 extern const Val_desc
*conv_dyn_feature1_strings(Conv_fmt_flags_t
);
88 extern const Val_desc
*conv_dyn_flag_strings(Conv_fmt_flags_t
);
89 extern const Val_desc
*conv_dyn_flag1_strings(Conv_fmt_flags_t
);
90 extern const Val_desc
*conv_dyn_posflag1_strings(Conv_fmt_flags_t
);
91 extern const conv_ds_t
**conv_dyn_tag_strings(conv_iter_osabi_t
, Half
,
93 extern const Val_desc2
*conv_sec_flags_strings(Conv_fmt_flags_t
);
100 #endif /* __CONV_DOT_H */