From 7e16fca05dfbcfd32c2ebc9e4d1abdac1cd8657c Mon Sep 17 00:00:00 2001 From: Ali Bahrami Date: Wed, 18 Mar 2009 13:28:28 -0600 Subject: 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 --- usr/src/lib/libproc/common/Psymtab.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'usr/src/lib/libproc/common/Psymtab.c') diff --git a/usr/src/lib/libproc/common/Psymtab.c b/usr/src/lib/libproc/common/Psymtab.c index 0a5c3dedd1..c279bdcd6a 100644 --- a/usr/src/lib/libproc/common/Psymtab.c +++ b/usr/src/lib/libproc/common/Psymtab.c @@ -20,7 +20,7 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2753,6 +2753,10 @@ static int Psymbol_iter_com(struct ps_prochandle *P, Lmid_t lmid, const char *object_name, int which, int mask, pr_order_t order, proc_xsym_f *func, void *cd) { +#if STT_NUM != (STT_IFUNC + 1) +#error "STT_NUM has grown. update Psymbol_iter_com()" +#endif + GElf_Sym sym; GElf_Shdr shdr; map_info_t *mptr; @@ -2833,11 +2837,11 @@ Psymbol_iter_com(struct ps_prochandle *P, Lmid_t lmid, const char *object_name, * In case you haven't already guessed, this relies on * the bitmask used in for encoding symbol * type and binding matching the order of STB and STT - * constants in . ELF can't change without - * breaking binary compatibility, so I think this is + * constants in . Changes to ELF must + * maintain binary compatibility, so I think this is * reasonably fair game. */ - if (s_bind < STB_NUM && s_type < STT_NUM) { + if (s_bind < STB_NUM && s_type < STT_IFUNC) { type = (1 << (s_type + 8)) | (1 << s_bind); if ((type & ~mask) != 0) continue; -- cgit v1.2.3