Merge branch 'master' of ssh://git.lttng.org/home/git/ust
[ust.git] / include / ust / tracepoint.h
index 2f89c1566c419bb3f85b61e55189e715768347b4..49a9b6e65bcc26807b57712de321df0e6abcc069 100644 (file)
@@ -222,16 +222,18 @@ extern int tracepoint_unregister_lib(struct tracepoint * const *tracepoints_star
 #define TRACEPOINT_LIB                                                 \
        extern struct tracepoint * const __start___tracepoints_ptrs[] __attribute__((weak, visibility("hidden"))); \
        extern struct tracepoint * const __stop___tracepoints_ptrs[] __attribute__((weak, visibility("hidden"))); \
+       static struct tracepoint * const __tracepoint_ptr_dummy         \
+       __attribute__((used, section("__tracepoints_ptrs"))) = NULL;    \
        static void __attribute__((constructor)) __tracepoints__init(void)      \
        {                                                                       \
-               tracepoint_register_lib(__start___tracepoints,                  \
-                                       __stop___tracepoints -                  \
-                                       __start___tracepoints);                 \
+               tracepoint_register_lib(__start___tracepoints_ptrs,                     \
+                                       __stop___tracepoints_ptrs -                     \
+                                       __start___tracepoints_ptrs);                    \
        }                                                                       \
                                                                                \
        static void __attribute__((destructor)) __tracepoints__destroy(void)    \
        {                                                                       \
-               tracepoint_unregister_lib(__start___tracepoints);               \
+               tracepoint_unregister_lib(__start___tracepoints_ptrs);          \
        }
 
 
@@ -377,6 +379,8 @@ extern int trace_event_unregister_lib(struct trace_event * const *start_trace_ev
        __attribute__((weak, visibility("hidden")));                    \
        extern struct trace_event * const __stop___trace_events_ptrs[]  \
        __attribute__((weak, visibility("hidden")));                    \
+       static struct trace_event * const __event_ptrs_dummy            \
+       __attribute__((used, section("__trace_events_ptrs"))) = NULL;   \
        static void __attribute__((constructor))                        \
        __trace_events__init(void)                                      \
        {                                                               \
This page took 0.024217 seconds and 4 git commands to generate.