From: Eric Anholt Date: Tue, 20 Mar 2012 20:51:31 +0000 (-0700) Subject: glx: Fix glXGetProcAddress() of global glX symbols post-automake conversion. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e07b1603e24ddd21a61b11390712c4b39d6a3c5c;p=mesa.git glx: Fix glXGetProcAddress() of global glX symbols post-automake conversion. When a GL LD_PRELOAD library like apitrace was used, glXGetProcAddress() would return the preload's symbols instead of libGL's symbol, leading to infinite recursion when the returned function was called. This didn't hit apitrace on most apps because who calls glXGetProcAddress() on the global functions. The -Bsymbolic, which was present in mklib before automake conversion, causes the glxcmds.c:GLX_functions table to be resolved at link time, so that LD_PRELOADs don't affect it any more. Fixes crashes when running wine under apitrace. Tested-by: Matt Turner Tested-by: Marek Olšák --- diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index a11bd3ff011..2e065885e52 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -101,6 +101,7 @@ GL_LIBS = \ $(GL_LIB_DEPS) GL_LDFLAGS = \ + -Wl,-Bsymbolic \ -version-number 1:2 libGL_la_SOURCES = $(GL_FILES)