targets/vdpau: use version script to limit the exported symbols
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 4 Apr 2014 22:59:30 +0000 (23:59 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 2 May 2014 20:48:26 +0000 (21:48 +0100)
Using export-symbols-regex is the least desirable method of restricting
the exported symbols, as is completely messes up with the symbol table.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/Automake.inc
src/gallium/targets/r600/vdpau/Makefile.am
src/gallium/targets/radeonsi/vdpau/Makefile.am
src/gallium/targets/vdpau-nouveau/Makefile.am
src/gallium/targets/vdpau.sym [new file with mode: 0644]

index 5a4f4e8c4552c2c6e8d3dcfc872c008c6d397434..4519c161c09f270d4c06202788288d3800a01ca9 100644 (file)
@@ -64,7 +64,7 @@ GALLIUM_VDPAU_LINKER_FLAGS = \
        -module \
        -no-undefined \
        -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) \
-       -export-symbols-regex $(VDPAU_EXPORTS) \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/vdpau.sym \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
index 455d90f795b36ad5f2bf8e32dae6d2298bbcb26d..b212024b752810ac83dd6cf57b54fc4aa2d6091e 100644 (file)
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
index b8dcf8865dfc7a58c222416aebdd3c535213c0c0..975ae7884b7927e39d9ec741e39cd81ffb1a0d48 100644 (file)
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|radeon_drm_winsys_create)$$'
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
index de1adf8361904a78b9b0f3ec8e77527fed175a0c..36d2f4761ffd47868f09a500d873fbbd55bdd78b 100644 (file)
@@ -20,8 +20,6 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-# Note: Make sure VDPAU_EXPORTS is defined before including Automake.inc
-VDPAU_EXPORTS = '^(vdp_imp_device_create_x11|nouveau_drm_screen_create)$$'
 include $(top_srcdir)/src/gallium/Automake.inc
 
 AM_CFLAGS = \
diff --git a/src/gallium/targets/vdpau.sym b/src/gallium/targets/vdpau.sym
new file mode 100644 (file)
index 0000000..f184193
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       global:
+               vdp_imp_device_create_x11;
+               nouveau_drm_screen_create;
+               radeon_drm_winsys_create;
+       local:
+               *;
+};