~lttng/lttng-ust/lttng-ust

Viewing all changes in revision 2506.

  • Committer: Mathieu Desnoyers
  • Date: 2021-01-20 16:59:04 UTC
  • Revision ID: git-v1:6c8cfec756dd209da46aa278133d4b2baaa5ea90
Fix: Use default visibility for tracepoint provider symbol

When building a probe provider `someprobe` with -fvisibility=hidden into
a shared library, the `__tracepoint_provider_someprobe` symbol is hidden,
which does not allow tracepoint instrumentation to link to it.

Fix this by using the "default" visibility attribute.

For a shared library built with -fvisibility=hidden, this changes the
output of nm for that symbol from:

000000000000417c b __tracepoint_provider_someprobe

(local BSS symbol)

to

000000000000417c B __tracepoint_provider_someprobe

(global (external) BSS symbol)

Fixes: #1296
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I308374f6cac58cca86e8eb19c872286a3da21a75

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: