From 71df6a153f042827f8bd261dbae9672d165c76df Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 1 Dec 2020 22:28:01 +0000 Subject: rtld: bump r_debug.r_version to 1 from current 0. Add r_ldbase. Requested and reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D27429 --- libexec/rtld-elf/rtld.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libexec/rtld-elf') diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 2f0fc9f10a6b..c6cd285c71d0 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -2272,8 +2272,10 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info) parse_rtld_phdr(&obj_rtld); obj_enforce_relro(&obj_rtld); + r_debug.r_version = R_DEBUG_VERSION; r_debug.r_brk = r_debug_state; r_debug.r_state = RT_CONSISTENT; + r_debug.r_ldbase = obj_rtld.relocbase; } /* -- cgit v1.2.3