targets/xvmc: limit the amount of exported symbols
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 4 Apr 2014 22:46:13 +0000 (23:46 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 2 May 2014 20:48:25 +0000 (21:48 +0100)
In the presence of LLVM the final library exports every symbol from
the llvm namespace. Resolve this by using a version script (w/o the
version/name tag).

Considering that there are only ~25 symbols, explicitly list them
to minimize the chances of rogue symbols sneaking in.

Drop the *winsys_create functions as they were only meant for
gl-vdpau interop.

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/xvmc.sym [new file with mode: 0644]

index 1f5d532e42645681f2dd1bab0649d151642e8ff5..f857c1a793dc33234c9014f10444824f96992098 100644 (file)
@@ -75,7 +75,7 @@ GALLIUM_XVMC_LINKER_FLAGS = \
        -module \
        -no-undefined \
        -version-number $(XVMC_MAJOR):$(XVMC_MINOR) \
-       -export-symbols-regex '^XvMC' \
+       -Wl,--version-script=$(top_srcdir)/src/gallium/targets/xvmc.sym \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
diff --git a/src/gallium/targets/xvmc.sym b/src/gallium/targets/xvmc.sym
new file mode 100644 (file)
index 0000000..f51378e
--- /dev/null
@@ -0,0 +1,32 @@
+{
+       global:
+               XvMCBlendSubpicture;
+               XvMCBlendSubpicture2;
+               XvMCClearSubpicture;
+               XvMCCompositeSubpicture;
+               XvMCCreateBlocks;
+               XvMCCreateContext;
+               XvMCCreateMacroBlocks;
+               XvMCCreateSubpicture;
+               XvMCCreateSurface;
+               XvMCDestroyBlocks;
+               XvMCDestroyContext;
+               XvMCDestroyMacroBlocks;
+               XvMCDestroySubpicture;
+               XvMCDestroySurface;
+               XvMCFlushSubpicture;
+               XvMCFlushSurface;
+               XvMCGetAttribute;
+               XvMCGetSubpictureStatus;
+               XvMCGetSurfaceStatus;
+               XvMCHideSurface;
+               XvMCPutSurface;
+               XvMCQueryAttributes;
+               XvMCRenderSurface;
+               XvMCSetAttribute;
+               XvMCSetSubpicturePalette;
+               XvMCSyncSubpicture;
+               XvMCSyncSurface;
+       local:
+               *;
+};