From 2ed96329a073f74bd33f766ab982be14f3205bc9 Mon Sep 17 00:00:00 2001 From: Bryan Cantrill Date: Fri, 5 Jun 2015 18:51:46 +0000 Subject: [PATCH] 6178 fix for 5234 reintroduced 3921 Reviewed by: Josef 'Jeff' Sipek Approved by: Richard Lowe --- usr/src/lib/libproc/common/Pcore.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/usr/src/lib/libproc/common/Pcore.c b/usr/src/lib/libproc/common/Pcore.c index c899ee1b209d..4ebca85e1fb5 100644 --- a/usr/src/lib/libproc/common/Pcore.c +++ b/usr/src/lib/libproc/common/Pcore.c @@ -2664,11 +2664,15 @@ Pfgrab_core(int core_fd, const char *aout_path, int *perr) P->map_exec = core_name_mapping(P, addr, "a.out"); /* - * If we're a statically linked executable, then just locate the - * executable's text and data and name them after the executable. + * If we're a statically linked executable (or we're on x86 and looking + * at a Linux core dump), then just locate the executable's text and + * data and name them after the executable. */ - if (base_addr == (uintptr_t)-1L || - core_info->core_osabi == ELFOSABI_NONE) { +#ifndef __x86 + if (base_addr == (uintptr_t)-1L) { +#else + if (base_addr == (uintptr_t)-1L || from_linux) { +#endif dprintf("looking for text and data: %s\n", execname); map_info_t *tmp, *dmp; file_info_t *fp;