aboutsummaryrefslogtreecommitdiff
path: root/lib/csu
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-02-07 13:27:29 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-02-07 13:27:29 +0000
commit38f4fb152533caf7ed5e5c36f0b11b2812027d69 (patch)
tree1a033a5adefeaef27ee04189bb869edb37eacaea /lib/csu
parentefa6e5fa69a59a4580773860c5db5edbbd493f77 (diff)
downloadsrc-38f4fb152533caf7ed5e5c36f0b11b2812027d69.tar.gz
src-38f4fb152533caf7ed5e5c36f0b11b2812027d69.zip
Support for more Sun compatible dlopen() and friends. Also added proper error
handling. Reviewed by: gj Submitted by: Mark Diekhans <markd@grizzly.com>
Notes
Notes: svn path=/head/; revision=6233
Diffstat (limited to 'lib/csu')
-rw-r--r--lib/csu/i386/Makefile3
-rw-r--r--lib/csu/i386/crt0.c17
2 files changed, 11 insertions, 9 deletions
diff --git a/lib/csu/i386/Makefile b/lib/csu/i386/Makefile
index 9b860b2c05a7..dfdbc387d48f 100644
--- a/lib/csu/i386/Makefile
+++ b/lib/csu/i386/Makefile
@@ -1,9 +1,10 @@
# from: @(#)Makefile 5.6 (Berkeley) 5/22/91
-# $Id: Makefile,v 1.10 1994/08/22 15:13:41 bde Exp $
+# $Id: Makefile,v 1.12 1994/09/19 02:00:18 ache Exp $
CFLAGS+= -DLIBC_SCCS -DDYNAMIC
OBJS= crt0.o gcrt0.o c++rt0.o
CLEANFILES+= a.out
+MAN3+= dlopen.3
all: ${OBJS}
diff --git a/lib/csu/i386/crt0.c b/lib/csu/i386/crt0.c
index f0ed885daf80..26592ba660a6 100644
--- a/lib/csu/i386/crt0.c
+++ b/lib/csu/i386/crt0.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: crt0.c,v 1.13 1994/09/19 02:00:21 ache Exp $
+ * $Id: crt0.c,v 1.14 1994/09/24 16:01:30 ache Exp $
*/
@@ -47,6 +47,7 @@ extern void _startup_setlocale __P((int, const char *));
#include <sys/types.h>
#include <sys/syscall.h>
#include <a.out.h>
+#include <string.h>
#ifndef N_GETMAGIC
#define N_GETMAGIC(x) ((x).a_magic)
#endif
@@ -117,7 +118,7 @@ char *__progname = empty;
#endif
#define _FATAL(str) \
- write(2, str, sizeof(str)), \
+ write(2, str, sizeof(str) - 1), \
_exit(1);
@@ -303,17 +304,17 @@ char *name;
return (ld_entry->dlsym)(fd, name);
}
-int
-dlctl(fd, cmd, arg)
-void *fd, *arg;
-int cmd;
+
+char *
+dlerror()
{
if (ld_entry == NULL)
- return -1;
+ return "Service unavailable";
- return (ld_entry->dlctl)(fd, cmd, arg);
+ return (ld_entry->dlerror)();
}
+
/*
* Support routines
*/