aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2022-01-06 07:14:09 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2022-01-06 07:14:09 +0000
commit2bf21b0e8e6f472f116a5806c05c379f0aaf4c55 (patch)
tree093e35b7d710aa1ae1282aa9580ccbb96c8c3973 /libexec
parent3c94280825c78c0ed00e1dcc704fac8a04f933e3 (diff)
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/rtld.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 14c4d44f50e4..e5ab2405a79c 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1461,6 +1461,12 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath,
obj->fini_array_num = dynp->d_un.d_val / sizeof(Elf_Addr);
break;
+ case DT_DEBUG:
+ if (!early)
+ dbg("Filling in DT_DEBUG entry");
+ (__DECONST(Elf_Dyn *, dynp))->d_un.d_ptr = (Elf_Addr)&r_debug;
+ break;
+
case DT_FLAGS:
if (dynp->d_un.d_val & DF_ORIGIN)
obj->z_origin = true;