diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-11-11 18:03:58 +0100 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-11-11 18:03:58 +0100 |
commit | 9182aa67994f4e8db378a949812176453e06cb34 (patch) | |
tree | d534944d5c888900876148a6c5a394a127ed9346 /elf | |
parent | 450a2e2d19bcf668b44778edef55c11d98aad2c6 (diff) | |
download | glibc-9182aa67994f4e8db378a949812176453e06cb34.tar glibc-9182aa67994f4e8db378a949812176453e06cb34.tar.gz glibc-9182aa67994f4e8db378a949812176453e06cb34.tar.bz2 glibc-9182aa67994f4e8db378a949812176453e06cb34.zip |
Fix vDSO l_name for GDB's: Can't read pathname for load map: Input/output error.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-object.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/elf/dl-object.c b/elf/dl-object.c index 0f594d25e6..26d4f44375 100644 --- a/elf/dl-object.c +++ b/elf/dl-object.c @@ -88,7 +88,13 @@ _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; + /* When we create the executable link map, or a VDSO link map, we start + with "" for the l_name. In these cases "" points to ld.so rodata + and won't get dumped during core file generation. Therefore to assist + gdb and to create more self-contained core files we adjust l_name to + point at the newly allocated copy (which will get dumped) instead of + the ld.so rodata copy. */ + new->l_name = *realname ? realname : (char *) newname->name + libname_len - 1; new->l_type = type; /* If we set the bit now since we know it is never used we avoid dirtying the cache line later. */ |