summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1995-04-07 05:08:28 +0000
committernate <nate@FreeBSD.org>1995-04-07 05:08:28 +0000
commit4371f7f1b8451ea70391ada0f619ad8c8558ceed (patch)
treedb1f5f03faaa24ef935890e1ce59757e8bf5947b /gnu
parent4fbc27d008f956acef7cf1d0397e8f0a27c79a73 (diff)
downloadFreeBSD-src-4371f7f1b8451ea70391ada0f619ad8c8558ceed.zip
FreeBSD-src-4371f7f1b8451ea70391ada0f619ad8c8558ceed.tar.gz
Back out my change to enforce command line linker order due to
underlying bugs which are caused by mixing static/shared libraries with this change in place. The shlib code is not capable of supporting this feature in it's present state and will need significant modifications in order to do so.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/ld/lib.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c
index e1e15d2..43953de 100644
--- a/gnu/usr.bin/ld/lib.c
+++ b/gnu/usr.bin/ld/lib.c
@@ -558,9 +558,12 @@ subfile_wanted_p(entry)
}
/*
- * If the shared object referenced is undefined
- * then note is as a common.
- */
+ * At this point, either the new symbol is a common
+ * and the shared object reference is undefined --
+ * in which case we note the common -- or the shared
+ * object reference has a definition -- in which case
+ * the library member takes precedence.
+ */
if (iscommon) {
/*
* New symbol is common, just takes its
@@ -582,17 +585,11 @@ subfile_wanted_p(entry)
if (write_map) {
print_file_name(entry, stdout);
fprintf(stdout,
- " uneeded due to shared lib ref %s (%d)\n",
+ " needed due to shared lib ref %s (%d)\n",
sp->name,
lsp ? lsp->nzlist.nlist.n_type : -1);
}
- /*
- * The shared object reference has a definition.
- * Since it was previously defined in a shlib, it
- * takes precedence over the new definition in the
- * library member.
- */
- return 0;
+ return 1;
}
}
OpenPOWER on IntegriCloud