From 167ff4df850ed5c954ee374db66a04b1c9a4ef34 Mon Sep 17 00:00:00 2001 From: Christian Babeux Date: Tue, 4 Dec 2012 16:21:40 -0500 Subject: [PATCH] Cygwin: Remove weak symbols attributes due to semantic differences Weak symbols on Cygwin/PE platforms do not have the same semantics as on Linux/ELF platforms [1]. The __start___tracepoints_ptrs and __stop___tracepoints_ptrs symbols were NULL and tracepoints were not properly registered due to this difference. [1] - http://cygwin.com/ml/cygwin/2010-04/msg00281.html --- include/lttng/tracepoint.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 5bab476b..01561d81 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -235,19 +235,14 @@ extern struct tracepoint_dlopen tracepoint_dlopen; __attribute__((used, section("__tracepoints_ptrs"))) = \ &__tracepoint_##_provider##___##_name; -/* - * These weak symbols, the constructor, and destructor take care of - * registering only _one_ instance of the tracepoints per shared-ojbect - * (or for the whole main program). - */ extern struct tracepoint * const __start___tracepoints_ptrs[] - __attribute__((weak, visibility("hidden"))); + __attribute__((visibility("hidden"))); extern struct tracepoint * const __stop___tracepoints_ptrs[] - __attribute__((weak, visibility("hidden"))); + __attribute__((visibility("hidden"))); int __tracepoint_registered - __attribute__((weak, visibility("hidden"))); + __attribute__((visibility("hidden"))); struct tracepoint_dlopen tracepoint_dlopen - __attribute__((weak, visibility("hidden"))); + __attribute__((visibility("hidden"))); static void __attribute__((constructor)) __tracepoints__init(void) { -- 2.34.1