Module Name:    src
Committed By:   christos
Date:           Tue May 24 20:32:33 UTC 2016

Modified Files:
        src/libexec/ld.elf_so: rtld.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.177 -r1.178 src/libexec/ld.elf_so/rtld.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/libexec/ld.elf_so/rtld.c
diff -u src/libexec/ld.elf_so/rtld.c:1.177 src/libexec/ld.elf_so/rtld.c:1.178
--- src/libexec/ld.elf_so/rtld.c:1.177	Mon Apr  6 05:34:15 2015
+++ src/libexec/ld.elf_so/rtld.c	Tue May 24 16:32:33 2016
@@ -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(Elf_Addr *sp, Elf_Addr relocbase)
 	_rtld_objloads++;
 
 	_rtld_linkmap_add(_rtld_objmain);
+	_rtld_objself.path = xstrdup(_rtld_objself.path);
 	_rtld_linkmap_add(&_rtld_objself);
 
 	++_rtld_objmain->refcount;

Reply via email to