Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/libexec/ld.aout_so Pull up revisions 1.78-1.80 (request...
details: https://anonhg.NetBSD.org/src/rev/f0298063b232
branches: netbsd-1-5
changeset: 491231:f0298063b232
user: he <he%NetBSD.org@localhost>
date: Fri Apr 06 09:39:43 2001 +0000
description:
Pull up revisions 1.78-1.80 (requested by itohy):
Several changes to consolidate with main trunk:
o Deal correctly with common symbols in shared libraries.
Fixes PR#10940.
o Deal correctly with an empty hints file.
o A few minor fixes.
diffstat:
libexec/ld.aout_so/rtld.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diffs (53 lines):
diff -r 8710838bb4f2 -r f0298063b232 libexec/ld.aout_so/rtld.c
--- a/libexec/ld.aout_so/rtld.c Fri Apr 06 09:39:23 2001 +0000
+++ b/libexec/ld.aout_so/rtld.c Fri Apr 06 09:39:43 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtld.c,v 1.76.4.1 2000/10/30 23:01:17 tv Exp $ */
+/* $NetBSD: rtld.c,v 1.76.4.2 2001/04/06 09:39:43 he Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -650,6 +650,10 @@
if (smp)
name += (long)LM_LDBASE(smp);
+#ifdef DEBUG
+ xprintf("map_object: loading %s\n", name);
+#endif
+
if (sodp->sod_library) {
usehints = 1;
again:
@@ -1080,8 +1084,11 @@
struct rt_symbol *rtsp;
struct nzlist *weak_np = 0;
- if ((rtsp = lookup_rts(name)) != NULL)
+ if ((rtsp = lookup_rts(name)) != NULL) {
+ /* common symbol is not a member of particular shlib */
+ *src_map = NULL;
return (rtsp->rt_sp);
+ }
weak_smp = NULL; /* XXX - gcc! */
@@ -1208,6 +1215,9 @@
rtsp = enter_rts(name, (long)calloc(1, common_size),
N_UNDF + N_EXT, 0, common_size, NULL);
+ /* common symbol is not a member of particular shlib */
+ *src_map = NULL;
+
#if DEBUG
xprintf("Allocating common: %s size %d at %#x\n", name, common_size, rtsp->rt_sp->nz_value);
#endif
@@ -1474,6 +1484,9 @@
{
struct hints_bucket *bp;
+ if (hheader->hh_nbucket == 0)
+ return (NULL);
+
bp = hbuckets + (hinthash(name, major, minor) % hheader->hh_nbucket);
while (1) {
Home |
Main Index |
Thread Index |
Old Index