[Mesa-dev] [PATCH 2/2] radeon/vdpau: only export necessary symbols

Christian König deathsimple at vodafone.de
Thu Sep 26 00:29:35 PDT 2013


From: Christian König <christian.koenig at amd.com>

Export only the absolutely necessary symbols in radeon vdpau targets.

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 src/gallium/targets/r300/vdpau/Makefile.am     | 3 +++
 src/gallium/targets/r600/vdpau/Makefile.am     | 3 +++
 src/gallium/targets/radeonsi/vdpau/Makefile.am | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/src/gallium/targets/r300/vdpau/Makefile.am b/src/gallium/targets/r300/vdpau/Makefile.am
index c928955..d44144b 100644
--- a/src/gallium/targets/r300/vdpau/Makefile.am
+++ b/src/gallium/targets/r300/vdpau/Makefile.am
@@ -33,6 +33,8 @@ AM_CPPFLAGS = \
 vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
 vdpau_LTLIBRARIES = libvdpau_r300.la
 
+EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
+
 nodist_EXTRA_libvdpau_r300_la_SOURCES = dummy.cpp
 libvdpau_r300_la_SOURCES = \
 	../drm_target.c \
@@ -41,6 +43,7 @@ libvdpau_r300_la_SOURCES = \
 libvdpau_r300_la_LDFLAGS = \
 	-module \
 	-version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
+	-export-symbols-regex $(EXPORTS) \
 	-shared \
 	-no-undefined
 
diff --git a/src/gallium/targets/r600/vdpau/Makefile.am b/src/gallium/targets/r600/vdpau/Makefile.am
index e45fd93..d7eb030 100644
--- a/src/gallium/targets/r600/vdpau/Makefile.am
+++ b/src/gallium/targets/r600/vdpau/Makefile.am
@@ -33,6 +33,8 @@ AM_CPPFLAGS = \
 vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
 vdpau_LTLIBRARIES = libvdpau_r600.la
 
+EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
+
 libvdpau_r600_la_SOURCES = \
 	../drm_target.c \
 	$(top_srcdir)/src/gallium/auxiliary/vl/vl_winsys_dri.c
@@ -40,6 +42,7 @@ libvdpau_r600_la_SOURCES = \
 libvdpau_r600_la_LDFLAGS = \
 	-module \
 	-version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
+	-export-symbols-regex $(EXPORTS) \
 	-shared \
 	-no-undefined
 
diff --git a/src/gallium/targets/radeonsi/vdpau/Makefile.am b/src/gallium/targets/radeonsi/vdpau/Makefile.am
index bda88e6..b5e1635 100644
--- a/src/gallium/targets/radeonsi/vdpau/Makefile.am
+++ b/src/gallium/targets/radeonsi/vdpau/Makefile.am
@@ -33,6 +33,8 @@ AM_CPPFLAGS = \
 vdpaudir = $(VDPAU_LIB_INSTALL_DIR)
 vdpau_LTLIBRARIES = libvdpau_radeonsi.la
 
+EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
+
 nodist_EXTRA_libvdpau_radeonsi_la_SOURCES = dummy.cpp
 libvdpau_radeonsi_la_SOURCES = \
 	../drm_target.c \
@@ -41,6 +43,7 @@ libvdpau_radeonsi_la_SOURCES = \
 libvdpau_radeonsi_la_LDFLAGS = \
 	-module \
 	-version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
+	-export-symbols-regex $(EXPORTS) \
 	-shared \
 	-no-undefined
 
-- 
1.8.1.2



More information about the mesa-dev mailing list