[Mesa-dev] [PATCH 05/16] targets/xvmc: limit the amount of exported symbols
Christian König
christian.koenig at amd.com
Sat Apr 5 02:31:45 PDT 2014
Am 05.04.2014 03:46, schrieb Emil Velikov:
> 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.
>
> Cc: Christian König <christian.koenig at amd.com>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Can't test it, but the change itself looks good to me.
Christian.
> ---
> src/gallium/Automake.inc | 2 +-
> src/gallium/targets/xvmc.sym | 32 ++++++++++++++++++++++++++++++++
> 2 files changed, 33 insertions(+), 1 deletion(-)
> create mode 100644 src/gallium/targets/xvmc.sym
>
> diff --git a/src/gallium/Automake.inc b/src/gallium/Automake.inc
> index 7b75a92..18f914e 100644
> --- a/src/gallium/Automake.inc
> +++ b/src/gallium/Automake.inc
> @@ -74,7 +74,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) \
> -Wl,--no-undefined
>
> diff --git a/src/gallium/targets/xvmc.sym b/src/gallium/targets/xvmc.sym
> new file mode 100644
> index 0000000..f51378e
> --- /dev/null
> +++ b/src/gallium/targets/xvmc.sym
> @@ -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:
> + *;
> +};
More information about the mesa-dev
mailing list