aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorPaul Richards <paul@FreeBSD.org>1993-11-09 04:19:36 +0000
committerPaul Richards <paul@FreeBSD.org>1993-11-09 04:19:36 +0000
commit3923b0019c438b595e77d8f73d62b37147df25f8 (patch)
treea0a32c784e66fc50e42eb3f64dc3fad913ef449c /libexec
parentbde1866a63c583c78d524c7261239c5fa78ed03e (diff)
downloadsrc-3923b0019c438b595e77d8f73d62b37147df25f8.tar.gz
src-3923b0019c438b595e77d8f73d62b37147df25f8.zip
Updated to newest ld from pk.
lib.c: Pull in archives containing definitions needed by shared objects. warnings.c: Less spurious "undefined symbol" msgs for shared library defined symbols. ld.c: Do a better job of recognising data in text segments, eg. `const char []'. shlib.c,ld/rtld/{Makefile rtld.c} Use strsep() in stead of strtok() and restore colons in eg. env. vars.
Notes
Notes: svn path=/head/; revision=740
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-aout/Makefile6
-rw-r--r--libexec/rtld-aout/rtld.c7
-rw-r--r--libexec/rtld-aout/shlib.c7
3 files changed, 11 insertions, 9 deletions
diff --git a/libexec/rtld-aout/Makefile b/libexec/rtld-aout/Makefile
index 31283d7d05b0..a7975f668a40 100644
--- a/libexec/rtld-aout/Makefile
+++ b/libexec/rtld-aout/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 1993/11/03 23:41:46 paul Exp $
+# $Id: Makefile,v 1.3 1993/11/08 13:20:39 pk Exp $
PROG= ld.so
SRCS= mdprologue.S rtld.c shlib.c etc.c md.c
@@ -8,7 +8,7 @@ LDDIR?= $(.CURDIR)/..
PICFLAG=-fpic
CFLAGS += -I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) -O $(PICFLAG) -DRTLD
LDFLAGS = -Bshareable -Bsymbolic -assert nosymbolic
-LIBS = -lc_pic -lgcc_pic
+LIBS = -lc_pic
BINDIR= /usr/libexec
.PATH: $(LDDIR) $(LDDIR)/$(MACHINE)
@@ -16,7 +16,7 @@ BINDIR= /usr/libexec
.SUFFIXES: .S
$(PROG):
- $(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS)
+ $(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIBS) $(LDADD)
.S.o:
$(CPP) $(.IMPSRC) | $(AS) -k -o $(.TARGET) -
diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c
index 433820af1be8..e833787d6d78 100644
--- a/libexec/rtld-aout/rtld.c
+++ b/libexec/rtld-aout/rtld.c
@@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: rtld.c,v 1.7 1993/11/03 21:35:54 pk Exp $
+ * $Id: rtld.c,v 1.8 1993/11/08 13:20:40 pk Exp $
*/
#include <sys/param.h>
@@ -888,10 +888,11 @@ int *usehints;
if (ld_path != NULL) {
/* Prefer paths from LD_LIBRARY_PATH */
- while ((cp = strtok(ld_path, ":")) != NULL) {
+ while ((cp = strsep(&ld_path, ":")) != NULL) {
- ld_path = NULL;
hint = findhint(name, major, minor, cp);
+ if (ld_path)
+ *(ld_path-1) = ':';
if (hint)
return hint;
}
diff --git a/libexec/rtld-aout/shlib.c b/libexec/rtld-aout/shlib.c
index 4be8354840c9..55cd8c387c5a 100644
--- a/libexec/rtld-aout/shlib.c
+++ b/libexec/rtld-aout/shlib.c
@@ -1,5 +1,5 @@
/*
- * $Id: shlib.c,v 1.3 1993/10/23 00:34:26 pk Exp $
+ * $Id: shlib.c,v 1.4 1993/11/08 13:21:23 pk Exp $
*/
#include <sys/param.h>
@@ -48,9 +48,10 @@ char *paths;
if (paths != NULL)
/* Add search directories from `paths' */
- while ((cp = strtok(paths, ":")) != NULL) {
- paths = NULL;
+ while ((cp = strsep(&paths, ":")) != NULL) {
add_search_dir(cp);
+ if (paths)
+ *(paths-1) = ':';
}
/* Append standard search directories */