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 Correct r_ldbase valuse



details:   https://anonhg.NetBSD.org/src/rev/c87bc6cb34e8
branches:  trunk
changeset: 938958:c87bc6cb34e8
user:      kamil <kamil%NetBSD.org@localhost>
date:      Tue Sep 22 00:41:27 2020 +0000

description:
Correct r_ldbase valuse

It shall be the relocbase value, not linkmap.

diffstat:

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

diffs (27 lines):

diff -r 8324732ac244 -r c87bc6cb34e8 libexec/ld.elf_so/rtld.c
--- a/libexec/ld.elf_so/rtld.c  Mon Sep 21 21:26:43 2020 +0000
+++ b/libexec/ld.elf_so/rtld.c  Tue Sep 22 00:41:27 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.c,v 1.206 2020/09/21 16:08:57 kamil Exp $  */
+/*     $NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $  */
 
 /*
  * Copyright 1996 John D. Polstra.
@@ -40,7 +40,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rtld.c,v 1.206 2020/09/21 16:08:57 kamil Exp $");
+__RCSID("$NetBSD: rtld.c,v 1.207 2020/09/22 00:41:27 kamil Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -397,7 +397,7 @@
        _rtld_debug.r_version = R_DEBUG_VERSION;
        _rtld_debug.r_brk = _rtld_debug_state;
        _rtld_debug.r_state = RT_CONSISTENT;
-       _rtld_debug.r_ldbase = &_rtld_objself.linkmap;
+       _rtld_debug.r_ldbase = _rtld_objself.relocbase;
 
        ehdr = (Elf_Ehdr *)mapbase;
        _rtld_objself.phdr = (Elf_Phdr *)((char *)mapbase + ehdr->e_phoff);



Home | Main Index | Thread Index | Old Index