[lttng-dev] linking c++ with shared object tracepoints
Jérémie Galarneau
jeremie.galarneau at efficios.com
Thu May 30 09:42:23 EDT 2013
On Thu, May 30, 2013 at 4:51 AM, Aryeh Weinreb <weinrea at gmail.com> wrote:
> Hi there,
>
> I am trying to link c++ code with c compiled tracepoints.
> It works when I link directly but when I put the tracepoints in a
> dynamic lib first I get an undefined reference to "tracepoint_dlopen".
> Is supported to link c++ code with c compiled tracepoints put it a dynamic lib?
Yes, I just tried it here.
>
> When I remove the hidden attribute from tracepoint_dlopen in
> lttng/tracepoint.h it links okay.
> What is the reason for declaring it hidden in the first place? Is it
> safe to remove it?
No, that wouldn't be safe. This is done to make sure loading multiple
.so providers doesn't cause symbols to be overridden.
The header is probably fine and I'd advise againt modifying it without
careful thought. Could you provide a short example reproducing the
problem?
Thanks,
Jérémie
>
> Thanks,
> aryeh
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list