Mesa (master): targets/libgl-xlib: hide all the exported symbol mayhem

Emil Velikov evelikov at kemper.freedesktop.org
Sun May 25 22:22:41 UTC 2014


Module: Mesa
Branch: master
Commit: 239df5b654fcc52ba2e35370476cb03193dba04c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=239df5b654fcc52ba2e35370476cb03193dba04c

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Sun May 25 01:54:42 2014 +0100

targets/libgl-xlib: hide all the exported symbol mayhem

Leave only the gl/glx and mangled gl symbols.
XMesa* was never an official interface and the only
user of it was mesa-demos, while they were still in
the same repo as mesa.

v2: Conditionally use the version-script.

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 src/gallium/targets/libgl-xlib/Makefile.am    |    5 +++++
 src/gallium/targets/libgl-xlib/libgl-xlib.sym |    7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/src/gallium/targets/libgl-xlib/Makefile.am b/src/gallium/targets/libgl-xlib/Makefile.am
index 7651333..4ed2025 100644
--- a/src/gallium/targets/libgl-xlib/Makefile.am
+++ b/src/gallium/targets/libgl-xlib/Makefile.am
@@ -50,6 +50,11 @@ lib at GL_LIB@_la_LDFLAGS = \
 	$(GC_SECTIONS) \
 	$(LD_NO_UNDEFINED)
 
+if HAVE_LD_VERSION_SCRIPT
+lib at GL_LIB@_la_LDFLAGS += \
+	-Wl,--version-script=$(top_srcdir)/src/gallium/targets/libgl-xlib/libgl-xlib.sym
+endif
+
 lib at GL_LIB@_la_LIBADD = \
 	$(top_builddir)/src/gallium/state_trackers/glx/xlib/libxlib.la \
 	$(top_builddir)/src/gallium/winsys/sw/xlib/libws_xlib.la \
diff --git a/src/gallium/targets/libgl-xlib/libgl-xlib.sym b/src/gallium/targets/libgl-xlib/libgl-xlib.sym
new file mode 100644
index 0000000..956fa40
--- /dev/null
+++ b/src/gallium/targets/libgl-xlib/libgl-xlib.sym
@@ -0,0 +1,7 @@
+{
+	global:
+		gl*;
+		mgl*;
+	local:
+		*;
+};
\ No newline at end of file




More information about the mesa-commit mailing list