summaryrefslogtreecommitdiff
path: root/libkms/kms-symbol-check
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-03-31 19:51:45 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-04-28 11:19:15 +0100
commitb0d4ee6907811337a40780e9c7ae8f0fc65914c6 (patch)
treeb72a282e29081b8d4e113309af9523673072cd6c /libkms/kms-symbol-check
parent983892d2756b4bcfcd455ec644afe666b9e0e447 (diff)
libkms: add symbols test
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'libkms/kms-symbol-check')
-rwxr-xr-xlibkms/kms-symbol-check25
1 files changed, 25 insertions, 0 deletions
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
new file mode 100755
index 00000000..658b2692
--- /dev/null
+++ b/libkms/kms-symbol-check
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# The following symbols (past the first five) are taken from the public headers.
+# A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func ) <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+kms_bo_create
+kms_bo_destroy
+kms_bo_get_prop
+kms_bo_map
+kms_bo_unmap
+kms_create
+kms_destroy
+kms_get_prop
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"