[Mesa-dev] [PATCH] Android: gallium_dri: pass dri.sym to linker
emil.l.velikov at gmail.com
Tue Aug 22 16:15:05 UTC 2017
On 21 August 2017 at 20:33, Rob Herring <robh at kernel.org> wrote:
> Pass the dri.sym version script to the linker. This ensures only
> explicitly exported symbols are exported and shrinks the library by up
> to 60KB.
> We need to pass "--undefined-version" because the Android build system
> sets --no-undefined-version by default and we get an error on
> __driDriverExtensions without the option.
> Suggested-by: Emil Velikov <emil.l.velikov at gmail.com>
> Signed-off-by: Rob Herring <robh at kernel.org>
> src/gallium/targets/dri/Android.mk | 4 ++++
> 1 file changed, 4 insertions(+)
> diff --git a/src/gallium/targets/dri/Android.mk b/src/gallium/targets/dri/Android.mk
> index 150b2e368e51..313930b76274 100644
> --- a/src/gallium/targets/dri/Android.mk
> +++ b/src/gallium/targets/dri/Android.mk
> @@ -32,6 +32,10 @@ LOCAL_SRC_FILES := target.c
> LOCAL_CFLAGS :=
> +LOCAL_LDFLAGS := \
> + -Wl,--version-script=$(LOCAL_PATH)/dri.sym \
> + -Wl,--undefined-version
Can you please add an inline comment about undefined-version. I'm thinking of:
"Depending on the build permutation, some of a function or two
mentioned in the sym file may be missing.
Which will lead to errors like the following unless --undefined-version is set.
version script assignment of to symbol FOO failed: symbol not defined
With a bit of comment (regardless if you use my example or not)
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
More information about the mesa-dev