[Mesa-dev] [PATCH 10/16] targets/osmesa: limit the amount of exported symbols

Emil Velikov emil.l.velikov at gmail.com
Fri Apr 4 18:46:59 PDT 2014


Explicitly list all the OSMesa* symbols and wildcast the gl*
ones.

Cc: Brian Paul <brianp at vmware.com>
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/gallium/targets/osmesa/Makefile.am |  1 +
 src/gallium/targets/osmesa/osmesa.sym  | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 src/gallium/targets/osmesa/osmesa.sym

diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am
index 5f46bd9..0fa153e 100644
--- a/src/gallium/targets/osmesa/Makefile.am
+++ b/src/gallium/targets/osmesa/Makefile.am
@@ -45,6 +45,7 @@ lib at OSMESA_LIB@_la_LDFLAGS = \
 	-module \
 	-no-undefined \
 	-version-number @OSMESA_VERSION@ \
+	-Wl,--version-script=$(top_srcdir)/src/gallium/targets/osmesa/osmesa.sym \
 	$(GC_SECTIONS) \
 	-Wl,--no-undefined
 
diff --git a/src/gallium/targets/osmesa/osmesa.sym b/src/gallium/targets/osmesa/osmesa.sym
new file mode 100644
index 0000000..b8230e0
--- /dev/null
+++ b/src/gallium/targets/osmesa/osmesa.sym
@@ -0,0 +1,18 @@
+{
+	global:
+		OSMesaColorClamp;
+		OSMesaCreateContext;
+		OSMesaCreateContextExt;
+		OSMesaDestroyContext;
+		OSMesaGetColorBuffer;
+		OSMesaGetCurrentContext;
+		OSMesaGetDepthBuffer;
+		OSMesaGetIntegerv;
+		OSMesaGetProcAddress;
+		OSMesaMakeCurrent;
+		OSMesaPixelStore;
+		OSMesaPostprocess;
+		gl*;
+	local:
+		*;
+};
-- 
1.9.1



More information about the mesa-dev mailing list