From 62cf7a7029ae90af1ea9ce16be5d9efbafa8ce17 Mon Sep 17 00:00:00 2001 From: paul Date: Tue, 9 Nov 1993 04:19:36 +0000 Subject: 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. --- libexec/rtld-aout/Makefile | 6 +++--- libexec/rtld-aout/rtld.c | 7 ++++--- libexec/rtld-aout/shlib.c | 7 ++++--- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'libexec/rtld-aout') diff --git a/libexec/rtld-aout/Makefile b/libexec/rtld-aout/Makefile index 31283d7..a7975f6 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 433820a..e833787 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 @@ -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 4be8354..55cd8c3 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 @@ -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 */ -- cgit v1.1