Cygwin: Remove weak symbols attributes due to semantic differences
authorChristian Babeux <christian.babeux@efficios.com>
Tue, 4 Dec 2012 21:21:40 +0000 (16:21 -0500)
committerChristian Babeux <christian.babeux@efficios.com>
Tue, 4 Dec 2012 21:21:40 +0000 (16:21 -0500)
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

index 5bab476b86485a112c98a5ab433fa13ec88cca7d..01561d81f4bebe62c7f4df35accb62504baaf681 100644 (file)
@@ -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)
 {
This page took 0.025013 seconds and 4 git commands to generate.