Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/librtld_db/dist fix the lookup of the rtld post...



details:   https://anonhg.NetBSD.org/src/rev/1d7b599e58f0
branches:  trunk
changeset: 344896:1d7b599e58f0
user:      chs <chs%NetBSD.org@localhost>
date:      Tue Apr 26 14:26:49 2016 +0000

description:
fix the lookup of the rtld postinit hook to use the netbsd names
for the object and symbol rather than the freebsd names.
remove the lookups of the preinit and dlactivity hooks
(which do not currently exist separately in rtld on netbsd) for now
since this rtld_db implementation does not report those events anyway.

diffstat:

 external/bsd/librtld_db/dist/rtld_db.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (39 lines):

diff -r b87873fc8e93 -r 1d7b599e58f0 external/bsd/librtld_db/dist/rtld_db.c
--- a/external/bsd/librtld_db/dist/rtld_db.c    Tue Apr 26 12:58:48 2016 +0000
+++ b/external/bsd/librtld_db/dist/rtld_db.c    Tue Apr 26 14:26:49 2016 +0000
@@ -30,7 +30,7 @@
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/lib/librtld_db/rtld_db.c 272488 2014-10-03 23:20:37Z markj $");
 #else
-__RCSID("$NetBSD: rtld_db.c,v 1.2 2015/09/24 14:15:58 christos Exp $");
+__RCSID("$NetBSD: rtld_db.c,v 1.3 2016/04/26 14:26:49 chs Exp $");
 #endif
 
 #include <sys/types.h>
@@ -240,17 +240,17 @@
 {
        GElf_Sym sym;
 
-       if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "r_debug_state",
+       /*
+        * preinit and dlactivity events are not supported yet.
+        */
+
+       rdap->rda_preinit_addr = (uintptr_t)-1;
+       rdap->rda_dlactivity_addr = (uintptr_t)-1;
+
+       if (proc_name2sym(rdap->rda_php, "ld.elf_so", "_rtld_debug_state",
            &sym, NULL) < 0)
                return (RD_ERR);
-       DPRINTF("found r_debug_state at 0x%lx\n", (unsigned long)sym.st_value);
-       rdap->rda_preinit_addr = sym.st_value;
-       rdap->rda_dlactivity_addr = sym.st_value;
-
-       if (proc_name2sym(rdap->rda_php, "ld-elf.so.1", "_r_debug_postinit",
-           &sym, NULL) < 0)
-               return (RD_ERR);
-       DPRINTF("found _r_debug_postinit at 0x%lx\n",
+       DPRINTF("found _rtld_debug_state at 0x%lx\n",
            (unsigned long)sym.st_value);
        rdap->rda_postinit_addr = sym.st_value;
 



Home | Main Index | Thread Index | Old Index