summaryrefslogtreecommitdiffstats
path: root/apps/osmocomBB/osmocomBB/include/ctors.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/osmocomBB/osmocomBB/include/ctors.h')
-rw-r--r--apps/osmocomBB/osmocomBB/include/ctors.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/osmocomBB/osmocomBB/include/ctors.h b/apps/osmocomBB/osmocomBB/include/ctors.h
new file mode 100644
index 0000000000..ee4c7b3e9a
--- /dev/null
+++ b/apps/osmocomBB/osmocomBB/include/ctors.h
@@ -0,0 +1,16 @@
+#ifndef _CTORS_H
+#define _CTORS_H
+
+#if 0
+/* only supported by gcc 3.4 or later */
+#define __ctor_data __attribute__ ((constructor) (100))
+#define __ctor_board __attribute__ ((constructor) (200))
+#else
+#define __ctor_data __attribute__ ((constructor))
+#define __ctor_board __attribute__ ((constructor))
+#endif
+
+/* iterate over list of constructor functions and call each element */
+void do_global_ctors(const char *ctors_start, const char *ctors_end);
+
+#endif