From: Pierre-Marc Fournier Date: Mon, 14 Dec 2009 07:10:01 +0000 (-0500) Subject: Add dummy marker and tracepoint to libust-initializer X-Git-Tag: v1.9.1~807 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d57c0d75a247da5dffd8b07a9717958f6cb76e64;p=lttng-ust.git Add dummy marker and tracepoint to libust-initializer Without these, the __start... and __stop... symbols are not defined, and compilation fails with an obscure relocation message. A more elegant solution should be found. --- diff --git a/libust-initializer.c b/libust-initializer.c index 7c474659..1bf709e3 100644 --- a/libust-initializer.c +++ b/libust-initializer.c @@ -11,5 +11,21 @@ #include #include +/* FIXME: We have to define at least one trace_mark and + * one tracepoint here. If we don't, the __start... and + * __stop... symbols won't be defined and the constructors + * won't be compilable. We should find a linker trick to + * avoid this. + */ + +DECLARE_TRACE(ust_dummytp, TPPROTO(void), TPARGS()); +DEFINE_TRACE(ust_dummytp); + +void dummy_libust_initializer_func(void) +{ + trace_mark(ust, dummymark, MARK_NOARGS); + trace_ust_dummytp(); +} + MARKER_LIB; TRACEPOINT_LIB;