From: Kienan Stewart Date: Tue, 17 Dec 2024 19:57:30 +0000 (-0500) Subject: liblttng-ctl: Hide mangled C++ symbols X-Git-Url: https://git.liburcu.org/?a=commitdiff_plain;h=5a306d34e7d8b5291ea1e43fef47e9b79f91192f;p=lttng-tools.git liblttng-ctl: Hide mangled C++ symbols 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 Signed-off-by: Jérémie Galarneau --- diff --git a/src/lib/lttng-ctl/Makefile.am b/src/lib/lttng-ctl/Makefile.am index 5700a86b2..eb18ea517 100644 --- a/src/lib/lttng-ctl/Makefile.am +++ b/src/lib/lttng-ctl/Makefile.am @@ -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 index 000000000..e3038f343 --- /dev/null +++ b/src/lib/lttng-ctl/liblttng-ctl.map @@ -0,0 +1,4 @@ +{ + local: + _Z*; +};