diff options
| author | Edward Pilatowicz <Edward.Pilatowicz@Sun.COM> | 2009-07-29 10:29:28 -0700 |
|---|---|---|
| committer | Edward Pilatowicz <Edward.Pilatowicz@Sun.COM> | 2009-07-29 10:29:28 -0700 |
| commit | d9452f237f843c1321abb5810d2f9ee6cbeae43c (patch) | |
| tree | dfcdd5236a225b33960c91dc69b82c7e8f76cd1c /usr/src/lib/libproc/amd64 | |
| parent | 88bb18d257c743ee382a1694604771c6b7dee061 (diff) | |
| download | illumos-joyent-d9452f237f843c1321abb5810d2f9ee6cbeae43c.tar.gz | |
6863263 libproc doesn't access in-core elf data correctly
Diffstat (limited to 'usr/src/lib/libproc/amd64')
| -rw-r--r-- | usr/src/lib/libproc/amd64/Pisadep.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr/src/lib/libproc/amd64/Pisadep.c b/usr/src/lib/libproc/amd64/Pisadep.c index c2ab4dd3ab..a78e304d4c 100644 --- a/usr/src/lib/libproc/amd64/Pisadep.c +++ b/usr/src/lib/libproc/amd64/Pisadep.c @@ -19,17 +19,16 @@ * CDDL HEADER END */ /* - * 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" - #include <sys/stack.h> #include <sys/regset.h> #include <sys/frame.h> #include <sys/sysmacros.h> #include <sys/trap.h> +#include <sys/machelf.h> #include <stdlib.h> #include <unistd.h> @@ -40,9 +39,6 @@ #include "Pcontrol.h" #include "Pstack.h" -#define M_PLT_NRSV 1 /* reserved PLT entries */ -#define M_PLT_ENTSIZE 16 /* size of each PLT entry */ - static uchar_t int_syscall_instr[] = { 0xCD, T_SYSCALLINT }; static uchar_t syscall_instr[] = { 0x0f, 0x05 }; @@ -61,7 +57,7 @@ Ppltdest(struct ps_prochandle *P, uintptr_t pltaddr) return (NULL); } - i = (pltaddr - fp->file_plt_base) / M_PLT_ENTSIZE - M_PLT_NRSV; + i = (pltaddr - fp->file_plt_base) / M_PLT_ENTSIZE - M_PLT_XNumber; if (P->status.pr_dmodel == PR_MODEL_LP64) { Elf64_Rela r; |
