Print DBG() message about compiler weak hidden symbol behavior
[lttng-ust.git] / liblttng-ust / tracepoint-weak-test.c
diff --git a/liblttng-ust/tracepoint-weak-test.c b/liblttng-ust/tracepoint-weak-test.c
new file mode 100644 (file)
index 0000000..e691fbb
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
+ */
+
+/* Test compiler support for weak symbols with hidden visibility. */
+char __tracepoint_test_symbol[9] __attribute__((weak, visibility("hidden")));
+
+__attribute__((visibility("hidden")))
+void *lttng_ust_tp_check_weak_hidden(void)
+{
+       return __tracepoint_test_symbol;
+}
This page took 0.023602 seconds and 4 git commands to generate.