phdr.c revision 8521e5e6630b57b9883c3979cd5589e53f09e044
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * CDDL HEADER START
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * The contents of this file are subject to the terms of the
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Common Development and Distribution License (the "License").
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * You may not use this file except in compliance with the License.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * See the License for the specific language governing permissions
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * and limitations under the License.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * When distributing Covered Code, include this CDDL HEADER in each
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * If applicable, add the following below this CDDL HEADER, with the
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk * fields enclosed by brackets "[]" replaced with your own identifying
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk * information: Portions Copyright [yyyy] [name of copyright owner]
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk * CDDL HEADER END
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Use is subject to license terms.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk#pragma ident "%Z%%M% %I% %E% SMI"
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * String conversion routines for program header attributes.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk/* Instantiate a local copy of conv_map2str() from _conv.h */
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkconv_phdr_type(Half mach, Word type, int fmt_flags)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk } else if ((type >= PT_SUNWBSS) && (type <= PT_HISUNW)) {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk (type - PT_SUNWBSS), fmt_flags, ARRAY_NELTS(uphdrs),
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk } else if ((type == PT_SUNW_UNWIND) && (mach == EM_AMD64)) {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk return (conv_invalid_val(string, CONV_INV_STRSIZE, type, 0));
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk#define PHDRSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk MSG_PF_X_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk MSG_PF_W_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk MSG_PF_R_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk MSG_PF_SUNW_FAILURE_SIZE + CONV_EXPN_FIELD_DEF_SEP_SIZE + \
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk CONV_INV_STRSIZE + CONV_EXPN_FIELD_DEF_SUFFIX_SIZE
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk { PF_SUNW_FAILURE, MSG_ORIG(MSG_PF_SUNW_FAILURE) },
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk static CONV_EXPN_FIELD_ARG conv_arg = { string, sizeof (string), vda };
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk return ((const char *)string);