about summary refs log tree commit diff
path: root/elf/dep4.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dep4.c')
-rw-r--r--elf/dep4.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/elf/dep4.c b/elf/dep4.c
new file mode 100644
index 0000000000..9aad67d659
--- /dev/null
+++ b/elf/dep4.c
@@ -0,0 +1,23 @@
+#include <unistd.h>
+
+extern int dep3 (void);
+
+static void
+__attribute__ ((constructor))
+init (void)
+{
+  write (1, "1", 1);
+}
+
+static void
+__attribute__ ((destructor))
+fini (void)
+{
+  write (1, "8", 1);
+}
+
+int
+dep4 (void)
+{
+  return dep3 ();
+}