libkms: convert to new symbols check

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
main
Eric Engestrom 2019-10-23 23:32:54 +01:00 committed by Eric Engestrom
parent 1386b99027
commit 35fa20f1fd
3 changed files with 15 additions and 31 deletions

View File

@ -1,27 +0,0 @@
#!/bin/sh
set -u
# 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"

8
libkms/kms-symbols.txt Normal file
View File

@ -0,0 +1,8 @@
kms_bo_create
kms_bo_destroy
kms_bo_get_prop
kms_bo_map
kms_bo_unmap
kms_create
kms_destroy
kms_get_prop

View File

@ -68,8 +68,11 @@ pkg.generate(
)
test(
'kms-symbol-check',
find_program('kms-symbol-check'),
env : env_test,
args : libkms,
'kms-symbols-check',
symbols_check,
args : [
'--lib', libkms,
'--symbols-file', files('kms-symbols.txt'),
'--nm', prog_nm.path(),
],
)