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

Adam Jackson ajax at redhat.com
Thu Feb 16 19:00:03 UTC 2017


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;
+
 	# skip attribute, if any
 	while ($n ~ /^(__attribute__|__global)/ ||
 	    # skip modifiers, if any
-- 
2.9.3



More information about the xorg-devel mailing list