From 2c2e64edaba0f6aeb181ca5b51eb8dea8e9b39f9 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Thu, 1 Aug 2013 08:10:31 -0700 Subject: egl: Do not export private symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libEGL was incorrectly exporting *all* symbols, public and private. This patch adds -fvisibility=hidden to libEGL's linker flags to ensure that only symbols annotated with __attribute__((visibility("default"))) get exported. Sanity-checked with libEGL's builtin DRI2 driver and the i965 DRI driver by running Piglit on X/EGL and by running weston-gears on Weston as an X client. Sanity-checked with libEGL's Gallium driver (which is not built-in) and the swrast Gallium driver by running es2gears_x11. Kristian reviewed the symbol diff in `nm libEGL.so`. CC: "9.2" CC: Ian Romanick Acked-by: Kristian Høgsberg Reviewed-by: Jakob Bornecrantz Signed-off-by: Chad Versace --- src/egl/wayland/wayland-drm/Makefile.am | 1 + src/egl/wayland/wayland-egl/Makefile.am | 1 + 2 files changed, 2 insertions(+) (limited to 'src/egl/wayland') diff --git a/src/egl/wayland/wayland-drm/Makefile.am b/src/egl/wayland/wayland-drm/Makefile.am index 4b2aeb3..08ee497 100644 --- a/src/egl/wayland/wayland-drm/Makefile.am +++ b/src/egl/wayland/wayland-drm/Makefile.am @@ -1,6 +1,7 @@ AM_CFLAGS = -I$(top_srcdir)/src/egl/main \ -I$(top_srcdir)/include \ $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(WAYLAND_CFLAGS) noinst_LTLIBRARIES = libwayland-drm.la diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am index 7d20a1a..138c170 100644 --- a/src/egl/wayland/wayland-egl/Makefile.am +++ b/src/egl/wayland/wayland-egl/Makefile.am @@ -2,6 +2,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = wayland-egl.pc AM_CFLAGS = $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(WAYLAND_CFLAGS) lib_LTLIBRARIES = libwayland-egl.la -- cgit v1.1