Source-Changes-HG archive

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

[src/netbsd-1-4]: src/libexec/ld.aout_so Pull up revision 1.77 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/18cfbe52018d
branches:  netbsd-1-4
changeset: 471196:18cfbe52018d
user:      he <he%NetBSD.org@localhost>
date:      Tue Oct 31 12:31:25 2000 +0000

description:
Pull up revision 1.77 (requested by tv and mycroft):
  In dlopen(), use the main program's library search path, to match
  semantics of other systems (and our ELF).

diffstat:

 libexec/ld.aout_so/rtld.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r d6320240b0d7 -r 18cfbe52018d libexec/ld.aout_so/rtld.c
--- a/libexec/ld.aout_so/rtld.c Fri Oct 27 22:09:48 2000 +0000
+++ b/libexec/ld.aout_so/rtld.c Tue Oct 31 12:31:25 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtld.c,v 1.73.2.1 1999/04/23 21:39:05 perry Exp $      */
+/*     $NetBSD: rtld.c,v 1.73.2.2 2000/10/31 12:31:25 he Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -361,6 +361,7 @@
                                        (caddr_t)0, 0, crtp->crt_dp);
        LM_PRIVATE(smp)->spd_refcount++;
        LM_PRIVATE(smp)->spd_flags |= _RTLD_MAIN | _RTLD_GLOBAL;
+       main_map = smp;
 
        smp = alloc_link_map(us, (struct sod *)0, (struct so_map *)0,
                                        (caddr_t)crtp->crt_ba, 0, dp);
@@ -589,8 +590,6 @@
        if (dp == NULL)
                return (smp);
 
-/*XXX*/        if (addr == 0) main_map = smp;
-
 #ifdef SUN_COMPAT
        smpp->spd_offset =
                (addr==0 && dp->d_version==LD_VERSION_SUN) ? PAGSIZ : 0;
@@ -1740,7 +1739,7 @@
 
        build_sod(name, sodp);
 
-       if ((smp = map_object(sodp, 0)) == NULL) {
+       if ((smp = map_object(sodp, main_map)) == NULL) {
 #ifdef DEBUG
 xprintf("%s: %s\n", name, strerror(errno));
 #endif



Home | Main Index | Thread Index | Old Index