From b241f904f0298dad54a1067275aeb0bfc981ca38 Mon Sep 17 00:00:00 2001 From: Yochai Shefi Simchon Date: Mon, 13 Jun 2011 17:06:33 +0300 Subject: [PATCH] Translator: fix eglGetProcAddress() on Linux Our implementation of eglGetProcAddress() resolves the function addresses in run time. Typically this is not an issue, but when a gl function is also implemented by the calling app the address was resolved to the calling app's version of the function rather than ours. This is the case with the glDrawTex{isfx}OES functions in the 1.1 conformance test. The solution is to add the -Bsymbolic switch when linking our libraries, so all symbol resolution is done internaly. The same fix should probably be done for Mac. --- tools/emulator/opengl/host/libs/Translator/EGL/Android.mk | 2 +- tools/emulator/opengl/host/libs/Translator/GLcommon/Android.mk | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/Android.mk b/tools/emulator/opengl/host/libs/Translator/EGL/Android.mk index 9fcf9ceb7..1109f121e 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/Android.mk +++ b/tools/emulator/opengl/host/libs/Translator/EGL/Android.mk @@ -8,7 +8,7 @@ OS_SRCS:= ifeq ($(HOST_OS),linux) OS_SRCS = EglX11Api.cpp - LOCAL_LDLIBS += -lX11 -lGL -ldl -lpthread + LOCAL_LDLIBS += -lX11 -lGL -ldl -lpthread endif ifeq ($(HOST_OS),darwin) diff --git a/tools/emulator/opengl/host/libs/Translator/GLcommon/Android.mk b/tools/emulator/opengl/host/libs/Translator/GLcommon/Android.mk index 9ad9c3175..78d8e504c 100644 --- a/tools/emulator/opengl/host/libs/Translator/GLcommon/Android.mk +++ b/tools/emulator/opengl/host/libs/Translator/GLcommon/Android.mk @@ -22,6 +22,8 @@ LOCAL_SRC_FILES := \ ifeq ($(HOST_OS),linux) # $(call emugl-export,LDFLAGS,-Wl,--whole-archive) $(call emugl-export,LDLIBS,-lGL -ldl) + GL_COMMON_LINKER_FLAGS := -Wl,-Bsymbolic + $(call emugl-export,LDFLAGS,$(GL_COMMON_LINKER_FLAGS)) endif ifeq ($(HOST_OS),windows)