diff options
author | Ali Bahrami <Ali.Bahrami@Sun.COM> | 2009-03-18 13:28:28 -0600 |
---|---|---|
committer | Ali Bahrami <Ali.Bahrami@Sun.COM> | 2009-03-18 13:28:28 -0600 |
commit | 7e16fca05dfbcfd32c2ebc9e4d1abdac1cd8657c (patch) | |
tree | 5033ac748bcd6544a0981e069919df2d213acead /usr/src/cmd/sgs/libconv/common/phdr.c | |
parent | c13e065d8ffc8eafc02caf1091e66e146a2b2ce4 (diff) | |
download | illumos-gate-7e16fca05dfbcfd32c2ebc9e4d1abdac1cd8657c.tar.gz |
6813909 generalize eh_frame support to non-amd64 platforms
--HG--
rename : usr/src/cmd/sgs/libld/common/unwind.amd.c => usr/src/cmd/sgs/libld/common/unwind.c
Diffstat (limited to 'usr/src/cmd/sgs/libconv/common/phdr.c')
-rw-r--r-- | usr/src/cmd/sgs/libconv/common/phdr.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr/src/cmd/sgs/libconv/common/phdr.c b/usr/src/cmd/sgs/libconv/common/phdr.c index cc32f6f8bc..233387f238 100644 --- a/usr/src/cmd/sgs/libconv/common/phdr.c +++ b/usr/src/cmd/sgs/libconv/common/phdr.c @@ -20,12 +20,10 @@ */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * String conversion routines for program header attributes. */ @@ -36,6 +34,7 @@ /* Instantiate a local copy of conv_map2str() from _conv.h */ DEFINE_conv_map2str +/*ARGSUSED*/ const char * conv_phdr_type(Half mach, Word type, Conv_fmt_flags_t fmt_flags, Conv_inv_buf_t *inv_buf) @@ -87,7 +86,7 @@ error "PT_NUM has grown. Update phdrs[]" return (conv_map2str(inv_buf, (type - PT_SUNWBSS), fmt_flags, ARRAY_NELTS(uphdrs), uphdrs)); } - } else if ((type == PT_SUNW_UNWIND) && (mach == EM_AMD64)) { + } else if (type == PT_SUNW_UNWIND) { switch (CONV_TYPE_FMT_ALT(fmt_flags)) { case CONV_FMT_ALT_DUMP: case CONV_FMT_ALT_FILE: @@ -95,6 +94,14 @@ error "PT_NUM has grown. Update phdrs[]" default: return (MSG_ORIG(MSG_PT_SUNW_UNWIND)); } + } else if (type == PT_SUNW_EH_FRAME) { + switch (CONV_TYPE_FMT_ALT(fmt_flags)) { + case CONV_FMT_ALT_DUMP: + case CONV_FMT_ALT_FILE: + return (MSG_ORIG(MSG_PT_SUNW_EH_FRAME_ALT)); + default: + return (MSG_ORIG(MSG_PT_SUNW_EH_FRAME)); + } } else return (conv_invalid_val(inv_buf, type, 0)); } |