Re: [Mesa-dev] [PATCH] egl: Do not export private symbols
On 08/06/2013 05:30 PM, Jakob Bornecrantz wrote: On Wed, Aug 7, 2013 at 2:00 AM, Chad Versace chad.vers...@linux.intel.comwrote: On 08/06/2013 03:02 PM, Jakob Bornecrantz wrote: On Wed, Aug 7, 2013 at 12:00 AM, Jakob Bornecrantz wallbra...@gmail.com wrote: On Tue, Aug 6, 2013 at 9:21 PM, Chad Versace chad.vers...@linux.intel.com wrote: 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 on X11/EGL with Piglit, and on Wayland by running weston-gears. You need to test this patch on a non-inbuilt driver, egl_gallium or egl_glx, none of which require you to have any hardware. Or force egl_dri2 to not be built in. Do that and you have my Reviewed-by: Jakob Bornecrantz ja...@vmware.com Ok. I'll run this on egl_gallium or egl_glx, and then report back. Either is fine, tho I have no idea if egl_glx even works. All looks good. I tested es2gears_x11 using egl_gallium with Gallium's swrast driver. I also verified with gdb that those drivers were actually used. I'll commit to master now. By the way, I talked to krh today, and he suggested that we delete egl_glx rather than allow it to bitrot. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] egl: Do not export private symbols
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 on X11/EGL with Piglit, and on Wayland by running weston-gears. CC: 9.2 mesa-sta...@lists.freedesktop.org CC: Ian Romanick i...@freedesktop.org CC: Kristian Høgsberg k...@bitplanet.net Signed-off-by: Chad Versace chad.vers...@linux.intel.com --- In my build of EGL, this patch made private the following previously public libEGL symbols. I build libEGL with --with-egl-platforms=x11,wayland,drm and without gallium. T _eglAddAtExitCall T _eglAppendArray T _eglBuiltInDriverDRI2 T _eglBuiltInDriverGLX D _eglBuiltInDrivers T _eglCheckDisplayHandle T _eglChooseConfig T _eglChooseModeMESA T _eglCreateArray T _eglDestroyCurrentThread T _eglEraseArray T _eglFindArray T _eglFindDisplay T _eglFiniDisplay T _eglFlattenArray T _eglGetConfigAttrib T _eglGetConfigs T _eglGetDriverProc T _eglGetModeAttribMESA T _eglGetModesMESA T _eglGetNativePlatform T _eglGetScreensMESA T _eglGetSyncAttribKHR D _eglGlobal T _eglInitResource T _eglIsCurrentThreadDummy T _eglLinkResource T _eglLookupConfig T _eglLookupMode T _eglLookupScreen T _eglMatchDriver T _eglQueryContext T _eglQueryModeStringMESA T _eglQueryScreenMESA T _eglQueryScreenModeMESA T _eglQueryScreenSurfaceMESA T _eglQueryString T _eglQuerySurface T _eglScreenPositionMESA T _eglSurfaceAttrib T _eglSwapInterval T _eglUnlinkResource T _eglUnloadDrivers T _eglstrdup T dri2_add_config T dri2_create_image_khr T dri2_create_screen T dri2_get_device_name_for_fd T dri2_get_driver_for_fd T dri2_initialize_drm T dri2_initialize_wayland T dri2_initialize_x11 T dri2_load_driver T dri2_load_driver_swrast T dri2_lookup_egl_image T dri2_setup_screen D dri2_to_egl_attribute_map D image_lookup_extension D use_invalidate T wayland_buffer_is_drm T wayland_drm_buffer_get_buffer T wayland_drm_buffer_get_format T wayland_drm_init T wayland_drm_uninit src/egl/drivers/dri2/Makefile.am| 1 + src/egl/drivers/glx/Makefile.am | 1 + src/egl/main/Makefile.am| 1 + src/egl/wayland/wayland-drm/Makefile.am | 1 + src/egl/wayland/wayland-egl/Makefile.am | 1 + 5 files changed, 5 insertions(+) diff --git a/src/egl/drivers/dri2/Makefile.am b/src/egl/drivers/dri2/Makefile.am index 45f7dfa..823ef5e 100644 --- a/src/egl/drivers/dri2/Makefile.am +++ b/src/egl/drivers/dri2/Makefile.am @@ -28,6 +28,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/src/egl/wayland/wayland-drm \ -I$(top_builddir)/src/egl/wayland/wayland-drm \ $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(LIBDRM_CFLAGS) \ $(LIBUDEV_CFLAGS) \ $(LIBKMS_CFLAGS) \ diff --git a/src/egl/drivers/glx/Makefile.am b/src/egl/drivers/glx/Makefile.am index 6bf67ea..6db95b4 100644 --- a/src/egl/drivers/glx/Makefile.am +++ b/src/egl/drivers/glx/Makefile.am @@ -22,6 +22,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/egl/main \ + $(VISIBILITY_CFLAGS) \ $(X11_CFLAGS) \ $(DEFINES) diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am index 1cfdce2..2e43860 100644 --- a/src/egl/main/Makefile.am +++ b/src/egl/main/Makefile.am @@ -27,6 +27,7 @@ AM_CFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/src/gbm/main \ $(DEFINES) \ + $(VISIBILITY_CFLAGS) \ $(EGL_CFLAGS) \ -D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \ -D_EGL_DRIVER_SEARCH_DIR=\$(EGL_DRIVER_INSTALL_DIR)\ \ 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 -- 1.8.3.1 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] egl: Do not export private symbols
On Tue, Aug 6, 2013 at 9:21 PM, Chad Versace chad.vers...@linux.intel.comwrote: 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 on X11/EGL with Piglit, and on Wayland by running weston-gears. You need to test this patch on a non-inbuilt driver, egl_gallium or egl_glx, none of which require you to have any hardware. Or force egl_dri2 to not be built in. Cheers, Jakob. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] egl: Do not export private symbols
On Wed, Aug 7, 2013 at 12:00 AM, Jakob Bornecrantz wallbra...@gmail.comwrote: On Tue, Aug 6, 2013 at 9:21 PM, Chad Versace chad.vers...@linux.intel.com wrote: 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 on X11/EGL with Piglit, and on Wayland by running weston-gears. You need to test this patch on a non-inbuilt driver, egl_gallium or egl_glx, none of which require you to have any hardware. Or force egl_dri2 to not be built in. Do that and you have my Reviewed-by: Jakob Bornecrantz ja...@vmware.com Cheers, Jakob. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] egl: Do not export private symbols
On 08/06/2013 03:02 PM, Jakob Bornecrantz wrote: On Wed, Aug 7, 2013 at 12:00 AM, Jakob Bornecrantz wallbra...@gmail.comwrote: On Tue, Aug 6, 2013 at 9:21 PM, Chad Versace chad.vers...@linux.intel.com wrote: 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 on X11/EGL with Piglit, and on Wayland by running weston-gears. You need to test this patch on a non-inbuilt driver, egl_gallium or egl_glx, none of which require you to have any hardware. Or force egl_dri2 to not be built in. Do that and you have my Reviewed-by: Jakob Bornecrantz ja...@vmware.com Ok. I'll run this on egl_gallium or egl_glx, and then report back. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] egl: Do not export private symbols
On Wed, Aug 7, 2013 at 2:00 AM, Chad Versace chad.vers...@linux.intel.comwrote: On 08/06/2013 03:02 PM, Jakob Bornecrantz wrote: On Wed, Aug 7, 2013 at 12:00 AM, Jakob Bornecrantz wallbra...@gmail.com wrote: On Tue, Aug 6, 2013 at 9:21 PM, Chad Versace chad.vers...@linux.intel.com wrote: 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 on X11/EGL with Piglit, and on Wayland by running weston-gears. You need to test this patch on a non-inbuilt driver, egl_gallium or egl_glx, none of which require you to have any hardware. Or force egl_dri2 to not be built in. Do that and you have my Reviewed-by: Jakob Bornecrantz ja...@vmware.com Ok. I'll run this on egl_gallium or egl_glx, and then report back. Either is fine, tho I have no idea if egl_glx even works. Cheers, Jakob. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev