elf.c revision 1638af81f0b976a8a9b6936111b901c225d1e4ec
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* String conversion routines for ELF header attributes.
*/
#include <stdio.h>
#include <string.h>
#include "_conv.h"
#include "elf_msg.h"
#include <sys/elf_SPARC.h>
/* Instantiate a local copy of conv_map2str() from _conv.h */
const char *
{
static char string[CONV_INV_STRSIZE];
};
static const Msg classes_alt[] = {
};
}
const char *
{
static char string[CONV_INV_STRSIZE];
};
static const Msg datas_dump[] = {
};
static const Msg datas_file[] = {
};
}
};
};
#error "EM_NUM has grown"
#endif
const char *
{
static char string[CONV_INV_STRSIZE];
}
const char *
{
static char string[CONV_INV_STRSIZE];
};
static const Msg etypes_alt[] = {
};
if (etype == ET_SUNWPSEUDO) {
return ((fmt_flags & CONV_FMTALTMASK)
}
}
const char *
{
static char string[CONV_INV_STRSIZE];
};
static const Msg versions_alt[] = {
};
}
#define EFLAGSZ CONV_EXPN_FIELD_DEF_PREFIX_SIZE + \
/*
* Make a string representation of the e_flags field.
*/
const char *
{
{ 0, 0 }
};
};
static const char *leading_str_arr[2];
const char **lstr = leading_str_arr;
/*
* Non-SPARC architectures presently provide no known flags.
*/
/*
* Valid vendor extension bits for SPARCV9. These must be
* updated along with elf_SPARC.h.
*/
}
(void) conv_expn_field(&conv_arg);
return (string);
}
}
/*
* A generic means of returning additional information for a rejected file in
* terms of a string.
*/
const char *
{
static char string[CONV_INV_STRSIZE];
if (type == SGS_REJ_MACH)
/* LINTED */
else if (type == SGS_REJ_CLASS)
/* LINTED */
else if (type == SGS_REJ_DATA)
/* LINTED */
else if (type == SGS_REJ_TYPE)
/* LINTED */
/*
* Only called from ld.so.1, thus M_MACH is hardcoded.
*/
else if (type == SGS_REJ_UNKFILE)
return ((const char *)0);
else
return (MSG_ORIG(MSG_STR_EMPTY));
} else
}