Mesa (master): automake: Link all libGL.so variants with -Bsymbolic.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Jun 1 20:24:48 UTC 2017


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

Author: Jose Fonseca <jfonseca at vmware.com>
Date:   Thu Jun  1 16:41:13 2017 +0100

automake: Link all libGL.so variants with -Bsymbolic.

We were linking src/glx with -Bsymbolic, but not the classic/gallium X11
libGL.so.

But it's always a good idea to build all libGL.so and all DRI drivers
with -Bsymbolic, otherwise they might resolve symbols from the 3rd party
application executable or shared libraries, which is _never_ what we
want.

In particular, this can happen when intercepting OpenGL calls with
apitrace, before
https://github.com/apitrace/apitrace/commit/63194b2573176ef34efce1a5c8b08e624b8dddf5

Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 src/gallium/targets/libgl-xlib/Makefile.am | 1 +
 src/mesa/drivers/x11/Makefile.am           | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/gallium/targets/libgl-xlib/Makefile.am b/src/gallium/targets/libgl-xlib/Makefile.am
index d3a781848e..a29199fe78 100644
--- a/src/gallium/targets/libgl-xlib/Makefile.am
+++ b/src/gallium/targets/libgl-xlib/Makefile.am
@@ -52,6 +52,7 @@ lib at GL_LIB@_la_SOURCES = xlib.c
 lib at GL_LIB@_la_LDFLAGS = \
 	-no-undefined \
 	-version-number $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \
+	$(BSYMBOLIC) \
 	$(GC_SECTIONS) \
 	$(LD_NO_UNDEFINED)
 
diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am
index 8c6b67d6a8..6e123ba1b3 100644
--- a/src/mesa/drivers/x11/Makefile.am
+++ b/src/mesa/drivers/x11/Makefile.am
@@ -74,6 +74,7 @@ lib at GL_LIB@_la_LIBADD = \
 lib at GL_LIB@_la_LDFLAGS = \
 	-no-undefined \
 	-version-number $(GL_MAJOR):$(GL_MINOR):$(GL_PATCH) \
+	$(BSYMBOLIC) \
 	$(GC_SECTIONS) \
 	$(LD_NO_UNDEFINED)
 




More information about the mesa-commit mailing list