From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org, Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Subject: Re: [PATCH] Skip VDSO when reading SO list
Date: Tue, 20 Aug 2013 11:44:00 -0000 [thread overview]
Message-ID: <87wqngfuy5.fsf@br87z6lw.de.ibm.com> (raw)
In-Reply-To: <20130819182907.GA2145@host2.jankratochvil.net> (Jan Kratochvil's message of "Mon, 19 Aug 2013 20:29:07 +0200")
Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> On Mon, 19 Aug 2013 16:44:13 +0200, Andreas Arnez wrote:
>> On some Linux versions, the file name (l_name) of a VDSO's link map
>> entry lies in read-only memory that is excluded from a core dump.
>> When reading such a core dump, GDB complains:
>>
>> warning: Can't read pathname for load map: Input/output error.
>
> I believe the right fix is in glibc instead:
> [patch] Fix vDSO l_name for GDB's: Can't read pathname for load map:Input/output error.
> http://sourceware.org/ml/libc-alpha/2009-10/msg00001.html
> Message-ID: <20091004161706.GA27450@host0.dyn.jankratochvil.net>
>
> Could you verify it works for you so that we could possibly ping it?
This patch doesn't apply anymore, because the glibc code has been
restructured, e.g. the vdso logic is now separated out in
elf/setup-vdso.h.
Maybe the following patch would nowadays do the trick.
diff --git a/elf/dl-object.c b/elf/dl-object.c
index 0f594d2..de142de 100644
--- a/elf/dl-object.c
+++ b/elf/dl-object.c
@@ -62,6 +62,7 @@ _dl_new_object (char *realname, const char *libname, int type,
size_t libname_len = strlen (libname) + 1;
struct link_map *new;
struct libname_list *newname;
+ static char rw_empty_string[] = { 0 };
#ifdef SHARED
/* We create the map for the executable before we know whether we have
auditing libraries and if yes, how many. Assume the worst. */
@@ -88,7 +89,7 @@ _dl_new_object (char *realname, const char *libname, int type,
/* newname->next = NULL; We use calloc therefore not necessary. */
newname->dont_free = 1;
- new->l_name = realname;
+ new->l_name = *realname ? realname : rw_empty_string;
new->l_type = type;
/* If we set the bit now since we know it is never used we avoid
dirtying the cache line later. */
next prev parent reply other threads:[~2013-08-20 11:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 14:44 Andreas Arnez
2013-08-19 18:30 ` Jan Kratochvil
2013-08-19 20:42 ` Joel Brobecker
2013-08-19 20:47 ` Jan Kratochvil
2013-08-19 21:13 ` Joel Brobecker
2013-08-20 11:44 ` Andreas Arnez [this message]
2013-08-20 13:47 ` Jan Kratochvil
2013-09-20 13:15 ` Jan Kratochvil
2013-09-20 15:27 ` Jan Kratochvil
2013-09-20 17:00 ` Andreas Arnez
2013-09-20 18:14 ` Jan Kratochvil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wqngfuy5.fsf@br87z6lw.de.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=krebbel@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox