summaryrefslogtreecommitdiffstats
path: root/tools/tools/shlib-compat/test/libtest1
diff options
context:
space:
mode:
Diffstat (limited to 'tools/tools/shlib-compat/test/libtest1')
-rw-r--r--tools/tools/shlib-compat/test/libtest1/Makefile6
-rw-r--r--tools/tools/shlib-compat/test/libtest1/Symbol.map12
-rw-r--r--tools/tools/shlib-compat/test/libtest1/test.c66
3 files changed, 84 insertions, 0 deletions
diff --git a/tools/tools/shlib-compat/test/libtest1/Makefile b/tools/tools/shlib-compat/test/libtest1/Makefile
new file mode 100644
index 0000000..32d77d4
--- /dev/null
+++ b/tools/tools/shlib-compat/test/libtest1/Makefile
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+TESTNUM= 1
+
+.include <../Makefile.inc>
+.include <bsd.lib.mk>
diff --git a/tools/tools/shlib-compat/test/libtest1/Symbol.map b/tools/tools/shlib-compat/test/libtest1/Symbol.map
new file mode 100644
index 0000000..67649ae
--- /dev/null
+++ b/tools/tools/shlib-compat/test/libtest1/Symbol.map
@@ -0,0 +1,12 @@
+/*
+ * $FreeBSD$
+ */
+
+TEST_1.0 {
+ func1;
+ func2;
+ func3;
+ func4;
+ func5;
+ func6;
+};
diff --git a/tools/tools/shlib-compat/test/libtest1/test.c b/tools/tools/shlib-compat/test/libtest1/test.c
new file mode 100644
index 0000000..dc3a561
--- /dev/null
+++ b/tools/tools/shlib-compat/test/libtest1/test.c
@@ -0,0 +1,66 @@
+/*
+ * $FreeBSD$
+ */
+
+#include <sys/types.h>
+#include <sys/stdint.h>
+
+struct s1 {
+ int32_t f1_int;
+ char *f2_str;
+ short f3_short;
+ uint64_t f4_uint64;
+ intmax_t f5_intmax;
+ void* f6_ptr;
+};
+
+struct s2 {
+ char f1_buf[30];
+ struct s1 *f2_s1;
+};
+
+struct s3 {
+ struct s1 f1_s1;
+ uint32_t f2_int32;
+};
+
+int func1(int a, int b);
+int func2(int64_t a, uint64_t b);
+void func3(struct s1 *s);
+void func4(struct s1 s);
+int func5(int a, void *b, struct s2 *s);
+int func6(char a, struct s3 *s);
+
+int
+func1(int a, int b)
+{
+ return (a - b);
+}
+
+int
+func2(int64_t a, uint64_t b)
+{
+ return (a - b);
+}
+
+void
+func3(struct s1 *s)
+{
+}
+
+void
+func4(struct s1 s)
+{
+}
+
+int
+func5(int a, void *b, struct s2 *s)
+{
+ return (0);
+}
+
+int
+func6(char a, struct s3 *s)
+{
+ return (0);
+}
OpenPOWER on IntegriCloud