summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2016-05-24 20:32:33 +0000
committerchristos <christos@NetBSD.org>2016-05-24 20:32:33 +0000
commitbf2ee5226bbbb1179e42ac342011e442022a6003 (patch)
tree91b25df45dfbfb0e91777ee9e7c94b1f38a6c1d2 /libexec
parentc2b2c26a885d849700eb8f4961c361352fd1dc83 (diff)
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 (limited to 'libexec')
-rw-r--r--libexec/ld.elf_so/rtld.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/ld.elf_so/rtld.c b/libexec/ld.elf_so/rtld.c
index 18488ea1a5c..bafc6b916f4 100644
--- a/libexec/ld.elf_so/rtld.c
+++ b/libexec/ld.elf_so/rtld.c
@@ -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;