@@ -43,5 +43,6 @@ libdrm_radeoninclude_HEADERS = $(LIBDRM_RADEON_H_FILES)
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_radeon.pc
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
TESTS = radeon-symbol-check
EXTRA_DIST = $(LIBDRM_RADEON_BOF_FILES) $(TESTS)
@@ -1,15 +1,10 @@
#!/bin/bash
+set -eu
-# The following symbols (past the first five) are taken from the public headers.
-# A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
+LIB=.libs/libdrm_radeon.so
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
-( grep -q "^$func$" || echo $func ) <<EOF
-__bss_start
-_edata
-_end
-_fini
-_init
+# Official ABI, taken from the header.
+REQ_FUNCS="
radeon_bo_debug
radeon_bo_get_handle
radeon_bo_get_src_domain
@@ -54,8 +49,6 @@ radeon_surface_best
radeon_surface_init
radeon_surface_manager_free
radeon_surface_manager_new
-EOF
-done)
+"
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> --- radeon/Makefile.am | 1 + radeon/radeon-symbol-check | 19 ++++++------------- 2 files changed, 7 insertions(+), 13 deletions(-)