From e6ec7ca3daaf1446574e340074ae353df775faa6 Mon Sep 17 00:00:00 2001 From: pk Date: Wed, 15 Dec 1993 13:26:46 +0000 Subject: [PATCH] Whoops, a couple of lines at the wrong place. --- gnu/usr.bin/ld/ld/lib.c | 18 +++++++++--------- gnu/usr.bin/ld/lib.c | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gnu/usr.bin/ld/ld/lib.c b/gnu/usr.bin/ld/ld/lib.c index 7bfd8eac287e..e79121a88dd1 100644 --- a/gnu/usr.bin/ld/ld/lib.c +++ b/gnu/usr.bin/ld/ld/lib.c @@ -1,5 +1,5 @@ /* - * $Id: lib.c,v 1.7 1993/12/10 20:24:48 pk Exp $ - library routines + * $Id: lib.c,v 1.8 1993/12/15 13:26:46 pk Exp $ - library routines */ #include @@ -626,18 +626,18 @@ read_shared_object (desc, entry) if (dyn2.ld_need) { struct link_object lobj; off_t offset; - struct file_entry *subentry, *prev = NULL; - - subentry = (struct file_entry *) - xmalloc(sizeof(struct file_entry)); - bzero(subentry, sizeof(struct file_entry)); - - subentry->superfile = entry; + struct file_entry *prev = NULL; offset = (off_t)dyn2.ld_need; while (1) { + struct file_entry *subentry; char *libname, name[MAXPATHLEN]; /*XXX*/ + subentry = (struct file_entry *) + xmalloc(sizeof(struct file_entry)); + bzero(subentry, sizeof(struct file_entry)); + subentry->superfile = entry; + lseek(desc, offset, L_SET); if (read(desc, &lobj, sizeof(lobj)) != sizeof(lobj)) { fatal_with_file( @@ -669,7 +669,7 @@ read_shared_object (desc, entry) else entry->subfiles = subentry; prev = subentry; - file_open(entry); + desc = file_open(entry); if ((offset = (off_t)lobj.lo_next) == 0) break; } diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c index 7bfd8eac287e..e79121a88dd1 100644 --- a/gnu/usr.bin/ld/lib.c +++ b/gnu/usr.bin/ld/lib.c @@ -1,5 +1,5 @@ /* - * $Id: lib.c,v 1.7 1993/12/10 20:24:48 pk Exp $ - library routines + * $Id: lib.c,v 1.8 1993/12/15 13:26:46 pk Exp $ - library routines */ #include @@ -626,18 +626,18 @@ read_shared_object (desc, entry) if (dyn2.ld_need) { struct link_object lobj; off_t offset; - struct file_entry *subentry, *prev = NULL; - - subentry = (struct file_entry *) - xmalloc(sizeof(struct file_entry)); - bzero(subentry, sizeof(struct file_entry)); - - subentry->superfile = entry; + struct file_entry *prev = NULL; offset = (off_t)dyn2.ld_need; while (1) { + struct file_entry *subentry; char *libname, name[MAXPATHLEN]; /*XXX*/ + subentry = (struct file_entry *) + xmalloc(sizeof(struct file_entry)); + bzero(subentry, sizeof(struct file_entry)); + subentry->superfile = entry; + lseek(desc, offset, L_SET); if (read(desc, &lobj, sizeof(lobj)) != sizeof(lobj)) { fatal_with_file( @@ -669,7 +669,7 @@ read_shared_object (desc, entry) else entry->subfiles = subentry; prev = subentry; - file_open(entry); + desc = file_open(entry); if ((offset = (off_t)lobj.lo_next) == 0) break; }