summaryrefslogtreecommitdiffstats
path: root/gdb/testsuite/gdb.base/so-impl-ld.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/so-impl-ld.c')
-rw-r--r--gdb/testsuite/gdb.base/so-impl-ld.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/so-impl-ld.c b/gdb/testsuite/gdb.base/so-impl-ld.c
new file mode 100644
index 0000000000..a8fa18949b
--- /dev/null
+++ b/gdb/testsuite/gdb.base/so-impl-ld.c
@@ -0,0 +1,18 @@
+/* This program is linked against SOM shared libraries, which the loader
+ automatically loads along with the program itself).
+ */
+
+#include <stdio.h>
+
+extern int solib_main (int);
+
+main ()
+{
+ int result;
+
+ /* Call a shlib function. */
+ result = solib_main (100);
+
+ /* Call it again. */
+ result = solib_main (result);
+}
OpenPOWER on IntegriCloud