Mesa (9.2): Use -Bsymbolic when linking libEGL.so

Carl Worth cworth at kemper.freedesktop.org
Tue Oct 1 21:13:28 UTC 2013


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

Author: Carl Worth <cworth at cworth.org>
Date:   Fri Sep 27 14:01:48 2013 -0700

Use -Bsymbolic when linking libEGL.so

For some reason that I don't yet fully understand, Glaze does not work with
libEGL unless libEGL is linked with -Bsymbolic.[*]

Beyond that specific reason, all of the reasons for which libGL.so is linked
with -Bsymbolic, (see the commit history), should also apply here.

[*] The specific behavior I am seeing is that when Glaze calls dlopen for
libEGL.so, ifunc resolvers within Glaze for EGL functions are called before
the dlopen returns. These resolvers cannot succeed, as they need the return
value from dlopen in order to find the functions to resolve to. I don't know
what's causing these resolvers to be called, but I have verified that linking
libEGL with -Bsymbolic causes this problematic behavior to stop.

CC: "9.1 and 9.2" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Eric Anholt <eric at anholt.net>
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
(cherry picked from commit 9baf35de5cd4a0d832ee185afb709868fd55bc93)

---

 src/egl/main/Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index cbb6a4d..9a39a02 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -75,7 +75,7 @@ libEGL_la_SOURCES = \
 
 libEGL_la_LIBADD = \
 	$(EGL_LIB_DEPS)
-libEGL_la_LDFLAGS = -version-number 1:0 -no-undefined
+libEGL_la_LDFLAGS = -Wl,-Bsymbolic -version-number 1:0 -no-undefined
 
 if HAVE_EGL_PLATFORM_X11
 AM_CFLAGS += -DHAVE_X11_PLATFORM




More information about the mesa-commit mailing list