summaryrefslogtreecommitdiff
path: root/libexec/ld.so/test
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/ld.so/test')
-rw-r--r--libexec/ld.so/test/A.C2
-rw-r--r--libexec/ld.so/test/B.C2
-rw-r--r--libexec/ld.so/test/a.h2
-rw-r--r--libexec/ld.so/test/dltest.c15
-rw-r--r--libexec/ld.so/test/ldt.c2
-rw-r--r--libexec/ld.so/test/libbar.c2
-rw-r--r--libexec/ld.so/test/libdep.c4
-rw-r--r--libexec/ld.so/test/libfoo.c2
-rw-r--r--libexec/ld.so/test/tst.C2
9 files changed, 32 insertions, 1 deletions
diff --git a/libexec/ld.so/test/A.C b/libexec/ld.so/test/A.C
index afacc0a102b..aaf9aa3127b 100644
--- a/libexec/ld.so/test/A.C
+++ b/libexec/ld.so/test/A.C
@@ -1,3 +1,5 @@
+/* $OpenBSD: A.C,v 1.3 2001/01/28 19:34:29 niklas Exp $ */
+
#include "iostream.h"
#include "a.h"
diff --git a/libexec/ld.so/test/B.C b/libexec/ld.so/test/B.C
index 8b60a608631..db3c8ea2d55 100644
--- a/libexec/ld.so/test/B.C
+++ b/libexec/ld.so/test/B.C
@@ -1,3 +1,5 @@
+/* $OpenBSD: B.C,v 1.2 2001/01/28 19:34:29 niklas Exp $ */
+
#include "iostream.h"
#include "a.h"
AA e("e");;
diff --git a/libexec/ld.so/test/a.h b/libexec/ld.so/test/a.h
index 1bd9be63ad8..c70443765fd 100644
--- a/libexec/ld.so/test/a.h
+++ b/libexec/ld.so/test/a.h
@@ -1,3 +1,5 @@
+/* $OpenBSD: a.h,v 1.3 2001/01/28 19:34:29 niklas Exp $ */
+
class B {
public:
B();
diff --git a/libexec/ld.so/test/dltest.c b/libexec/ld.so/test/dltest.c
index 2a3fd3e6150..7d722b43188 100644
--- a/libexec/ld.so/test/dltest.c
+++ b/libexec/ld.so/test/dltest.c
@@ -1,11 +1,19 @@
+/* $OpenBSD: dltest.c,v 1.2 2001/01/28 19:34:29 niklas Exp $ */
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <dlfcn.h>
#include <ctype.h>
+#include <elf_abi.h>
+#include <machine/reloc.h>
+#include <nlist.h>
+#include "../powerpc/archdep.h"
+#include "../resolve.h"
typedef void (*func_t)(const char *);
+#define DL_NOW 0
void
dltest(const char *s)
{
@@ -15,6 +23,7 @@ dltest(const char *s)
}
putchar('\n');
}
+struct elf_object *foo;
main(int argc, char **argv)
{
@@ -55,6 +64,7 @@ main(int argc, char **argv)
}
}
+ printf("opening library %s for function %s\n", libname, funcname);
handle = dlopen(libname, mode);
if(handle == NULL) {
fprintf(stderr, "%s: dlopen: '%s'\n", libname, dlerror());
@@ -77,15 +87,18 @@ main(int argc, char **argv)
(*fptr)(param);
+#ifdef __mips__
dlctl(handle, DL_DUMP_MAP, NULL);
+#endif /* __mips__ */
dlclose(handle);
printf("After 'dlclose()'\n");
+#ifdef __mips__
dlctl(handle, DL_DUMP_MAP, NULL);
+#endif /* __mips__ */
return(0);
}
-
diff --git a/libexec/ld.so/test/ldt.c b/libexec/ld.so/test/ldt.c
index 6ba2abff044..74d9643e55b 100644
--- a/libexec/ld.so/test/ldt.c
+++ b/libexec/ld.so/test/ldt.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: ldt.c,v 1.2 2001/01/28 19:34:29 niklas Exp $ */
+
#include <stdio.h>
main()
{
diff --git a/libexec/ld.so/test/libbar.c b/libexec/ld.so/test/libbar.c
index 10a3ce8a589..1ad13f83127 100644
--- a/libexec/ld.so/test/libbar.c
+++ b/libexec/ld.so/test/libbar.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: libbar.c,v 1.2 2001/01/28 19:34:29 niklas Exp $ */
+
#include <stdio.h>
extern void dltest(const char *);
diff --git a/libexec/ld.so/test/libdep.c b/libexec/ld.so/test/libdep.c
index f85a3f30820..364e7e81eba 100644
--- a/libexec/ld.so/test/libdep.c
+++ b/libexec/ld.so/test/libdep.c
@@ -1,4 +1,8 @@
+/* $OpenBSD: libdep.c,v 1.2 2001/01/28 19:34:29 niklas Exp $ */
+
#include <stdio.h>
+const char *const libname = "libdep.so";
+
void
dep(const char *s)
diff --git a/libexec/ld.so/test/libfoo.c b/libexec/ld.so/test/libfoo.c
index e1034d778d3..6ac55551988 100644
--- a/libexec/ld.so/test/libfoo.c
+++ b/libexec/ld.so/test/libfoo.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: libfoo.c,v 1.2 2001/01/28 19:34:29 niklas Exp $ */
+
#include <stdio.h>
extern void dltest(const char *s);
diff --git a/libexec/ld.so/test/tst.C b/libexec/ld.so/test/tst.C
index fa7703c6892..9bdb1ba958e 100644
--- a/libexec/ld.so/test/tst.C
+++ b/libexec/ld.so/test/tst.C
@@ -1,3 +1,5 @@
+/* $OpenBSD: tst.C,v 1.3 2001/01/28 19:34:29 niklas Exp $ */
+
#include "iostream.h"
#include "a.h"