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/lib/libproc/common/Psymtab.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/lib/libproc/common/Psymtab.c')
-rw-r--r-- | usr/src/lib/libproc/common/Psymtab.c | 12 |
1 files changed, 8 insertions, 4 deletions
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 <libproc.h> for encoding symbol * type and binding matching the order of STB and STT - * constants in <sys/elf.h>. ELF can't change without - * breaking binary compatibility, so I think this is + * constants in <sys/elf.h>. 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; |