struct list_head list;
};
-extern int marker_register_lib(struct marker *markers_start, struct marker_addr *marker_addr_start, int markers_count);
-
-#define MARKER_LIB \
-extern struct marker __start___markers[] __attribute__((visibility("hidden"))); \
-extern struct marker __stop___markers[] __attribute__((visibility("hidden"))); \
-extern struct marker_addr __start___marker_addr[] __attribute__((visibility("hidden"))); \
-extern struct marker_addr __stop___marker_addr[] __attribute__((visibility("hidden"))); \
- \
-static void __attribute__((constructor)) __markers__init(void) \
-{ \
- marker_register_lib(__start___markers, __start___marker_addr, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker)); \
-}
+extern int marker_register_lib(struct marker *markers_start,
+ struct marker_addr *marker_addr_start,
+ int markers_count);
+
+#define MARKER_LIB \
+ extern struct marker __start___markers[] __attribute__((weak, visibility("hidden"))); \
+ extern struct marker __stop___markers[] __attribute__((weak, visibility("hidden"))); \
+ extern struct marker_addr __start___marker_addr[] __attribute__((weak, visibility("hidden"))); \
+ extern struct marker_addr __stop___marker_addr[] __attribute__((weak, visibility("hidden"))); \
+ \
+ static void __attribute__((constructor)) __markers__init(void) \
+ { \
+ marker_register_lib(__start___markers, __start___marker_addr, (((long)__stop___markers)-((long)__start___markers))/sizeof(struct marker)); \
+ }
extern void marker_set_new_marker_cb(void (*cb)(struct marker *));
extern void init_markers(void);
int tracepoints_count);
#define TRACEPOINT_LIB \
- extern struct tracepoint __start___tracepoints[] __attribute__((visibility("hidden"))); \
- extern struct tracepoint __stop___tracepoints[] __attribute__((visibility("hidden"))); \
+ extern struct tracepoint __start___tracepoints[] __attribute__((weak, visibility("hidden"))); \
+ extern struct tracepoint __stop___tracepoints[] __attribute__((weak, visibility("hidden"))); \
static void __attribute__((constructor)) __tracepoints__init(void) \
{ \
tracepoint_register_lib(__start___tracepoints, \