From: Mathieu Desnoyers Date: Thu, 17 Feb 2011 19:34:55 +0000 (-0500) Subject: Tracepoints: refer to new section name X-Git-Tag: v1.9.1~471 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bf5fe926fa64722edcc3efa14a4683e3bb9c2673;p=lttng-ust.git Tracepoints: refer to new section name Signed-off-by: Mathieu Desnoyers --- diff --git a/include/ust/tracepoint.h b/include/ust/tracepoint.h index 8be86979..2f89c156 100644 --- a/include/ust/tracepoint.h +++ b/include/ust/tracepoint.h @@ -220,17 +220,18 @@ extern int tracepoint_register_lib(struct tracepoint * const *tracepoints_start, extern int tracepoint_unregister_lib(struct tracepoint * const *tracepoints_start); #define TRACEPOINT_LIB \ - extern struct tracepoint * const __start___tracepoints[] __attribute__((weak, visibility("hidden"))); \ - extern struct tracepoint * const __stop___tracepoints[] __attribute__((weak, visibility("hidden"))); \ - static void __attribute__((constructor)) __tracepoints__init(void) \ - { \ - tracepoint_register_lib(__start___tracepoints, \ - (((long)__stop___tracepoints)-((long)__start___tracepoints)) / sizeof(*__start___tracepoints)); \ - } \ - \ - static void __attribute__((destructor)) __tracepoints__destroy(void) \ - { \ - tracepoint_unregister_lib(__start___tracepoints); \ + extern struct tracepoint * const __start___tracepoints_ptrs[] __attribute__((weak, visibility("hidden"))); \ + extern struct tracepoint * const __stop___tracepoints_ptrs[] __attribute__((weak, visibility("hidden"))); \ + static void __attribute__((constructor)) __tracepoints__init(void) \ + { \ + tracepoint_register_lib(__start___tracepoints, \ + __stop___tracepoints - \ + __start___tracepoints); \ + } \ + \ + static void __attribute__((destructor)) __tracepoints__destroy(void) \ + { \ + tracepoint_unregister_lib(__start___tracepoints); \ }