[PATCH xserver] sdksyms: Tighten up the symbols we add to the magic table

Peter Hutterer peter.hutterer at who-t.net
Thu Feb 16 23:41:40 UTC 2017


On Thu, Feb 16, 2017 at 02:00:03PM -0500, Adam Jackson wrote:
> The code as written would match anything declared extern. _X_EXPORT is
> what we really mean here. That's a macro, so check for what it expands
> to and skip if not found.
> 
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  hw/xfree86/sdksyms.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
> index cf26892..10909d0 100755
> --- a/hw/xfree86/sdksyms.sh
> +++ b/hw/xfree86/sdksyms.sh
> @@ -343,6 +343,10 @@ BEGIN {
>             n = 1;
>          }
>  
> +        # only match _X_EXPORT
> +        if ($n !~ /^(__attribute__..visibility..default|__global)/)
> +            next;

Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>

> +
>  	# skip attribute, if any
>  	while ($n ~ /^(__attribute__|__global)/ ||
>  	    # skip modifiers, if any

fwiw, just a line below here there's still a mention of _X_EXPORT which is
a noop:

              $n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||

feel free to remove that one with my rev-by.

Cheers,
   Peter
 


More information about the xorg-devel mailing list