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

Emil Velikov emil.l.velikov at gmail.com
Fri May 2 14:02:16 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 067f980..0ec8a26 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) \
 	$(LD_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.2



More information about the mesa-dev mailing list