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
__attribute__((used, section("__tracepoints_ptrs"))) = \
&__tracepoint_##_provider##___##_name;
__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[]
extern struct tracepoint * const __start___tracepoints_ptrs[]
- __attribute__((weak, visibility("hidden")));
+ __attribute__((visibility("hidden")));
extern struct tracepoint * const __stop___tracepoints_ptrs[]
extern struct tracepoint * const __stop___tracepoints_ptrs[]
- __attribute__((weak, visibility("hidden")));
+ __attribute__((visibility("hidden")));
int __tracepoint_registered
int __tracepoint_registered
- __attribute__((weak, visibility("hidden")));
+ __attribute__((visibility("hidden")));
struct tracepoint_dlopen tracepoint_dlopen
struct tracepoint_dlopen tracepoint_dlopen
- __attribute__((weak, visibility("hidden")));
+ __attribute__((visibility("hidden")));
static void __attribute__((constructor)) __tracepoints__init(void)
{
static void __attribute__((constructor)) __tracepoints__init(void)
{