]> git.liburcu.org Git - lttng-tools.git/commitdiff
liblttng-ctl: Hide mangled C++ symbols
authorKienan Stewart <kstewart@efficios.com>
Tue, 17 Dec 2024 19:57:30 +0000 (14:57 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 16 Jan 2025 19:21:06 +0000 (19:21 +0000)
A number of functions in C++ have default visibility. To avoid those
symbols being erroneously available to those who load the liblttng-ctl
library, a version script has been added to set the visibility of all
name-mangled symbols to local.

Change-Id: If2df7cfbadb0d1b9d3747cdf4990cbc942118e6f
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/Makefile.am
src/lib/lttng-ctl/liblttng-ctl.map [new file with mode: 0644]

index 5700a86b2785ce94dde052e1a79f4cbe2e48268a..eb18ea517747ae70e4e526bb1a1f86d449cd00de 100644 (file)
@@ -21,11 +21,13 @@ liblttng_ctl_la_SOURCES = \
 
 liblttng_ctl_la_LDFLAGS = \
                $(LT_NO_UNDEFINED) \
-               -export-symbols $(srcdir)/liblttng-ctl.sym
+               -export-symbols $(srcdir)/liblttng-ctl.sym \
+               -Wl,--version-script=$(srcdir)/liblttng-ctl.map
 
 EXTRA_liblttng_ctl_la_DEPENDENCIES = liblttng-ctl.sym
 
-EXTRA_DIST = liblttng-ctl.sym
+EXTRA_DIST = liblttng-ctl.map \
+               liblttng-ctl.sym
 
 liblttng_ctl_la_LIBADD = \
                $(top_builddir)/src/common/libsessiond-comm.la \
diff --git a/src/lib/lttng-ctl/liblttng-ctl.map b/src/lib/lttng-ctl/liblttng-ctl.map
new file mode 100644 (file)
index 0000000..e3038f3
--- /dev/null
@@ -0,0 +1,4 @@
+{
+  local:
+    _Z*;
+};
This page took 0.029692 seconds and 4 git commands to generate.