Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/ld.elf_so Put the name of the dynamic linker in allo...



details:   https://anonhg.NetBSD.org/src/rev/4bbd4b61bc66
branches:  trunk
changeset: 345403:4bbd4b61bc66
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 24 20:32:33 2016 +0000

description:
Put the name of the dynamic linker in allocated memory, so that it becomes
part of the core file link-map, so that gdb can find it.

diffstat:

 libexec/ld.elf_so/rtld.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 5e4595e935da -r 4bbd4b61bc66 libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c  Tue May 24 20:20:57 2016 +0000
+++ b/libexec/ld.elf_so/rtld.c  Tue May 24 20:32:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.c,v 1.177 2015/04/06 09:34:15 yamt Exp $   */
+/*     $NetBSD: rtld.c,v 1.178 2016/05/24 20:32:33 christos Exp $       */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.177 2015/04/06 09:34:15 yamt Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.178 2016/05/24 20:32:33 christos Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -654,6 +654,7 @@
        _rtld_objloads++;
 
        _rtld_linkmap_add(_rtld_objmain);
+       _rtld_objself.path = xstrdup(_rtld_objself.path);
        _rtld_linkmap_add(&_rtld_objself);
 
        ++_rtld_objmain->refcount;



Home | Main Index | Thread Index | Old Index