diff mbox

[libdrm,11/11] tegra: use new symbols checking script

Message ID 20180404154145.27607-11-eric.engestrom@imgtec.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eric Engestrom April 4, 2018, 3:41 p.m. UTC
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
 tegra/Makefile.am        |  1 +
 tegra/tegra-symbol-check | 22 ++++++----------------
 2 files changed, 7 insertions(+), 16 deletions(-)
diff mbox

Patch

diff --git a/tegra/Makefile.am b/tegra/Makefile.am
index fb40be55a3b807fcfb6d..a88bea5225efcc942d12 100644
--- a/tegra/Makefile.am
+++ b/tegra/Makefile.am
@@ -21,5 +21,6 @@  libdrm_tegrainclude_HEADERS = tegra.h
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_tegra.pc
 
+AM_TESTS_ENVIRONMENT = top_srcdir='$(top_srcdir)'
 TESTS = tegra-symbol-check
 EXTRA_DIST = $(TESTS)
diff --git a/tegra/tegra-symbol-check b/tegra/tegra-symbol-check
index 509b678c37b899a25f0a..4a340df2567e45792f98 100755
--- a/tegra/tegra-symbol-check
+++ b/tegra/tegra-symbol-check
@@ -1,18 +1,10 @@ 
 #!/bin/bash
+set -eu
 
-# The following symbols (past the first nine) are taken from tegra.h.
+LIB=.libs/libdrm_tegra.so
 
-FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
-( grep -q "^$func$" || echo $func )  <<EOF
-__bss_end__
-__bss_start__
-__bss_start
-__end__
-_bss_end__
-_edata
-_end
-_fini
-_init
+# Official ABI, taken from the header.
+REQ_FUNCS="
 drm_tegra_bo_get_flags
 drm_tegra_bo_get_handle
 drm_tegra_bo_get_tiling
@@ -26,8 +18,6 @@  drm_tegra_bo_unref
 drm_tegra_bo_wrap
 drm_tegra_close
 drm_tegra_new
-EOF
-done)
+"
 
-test ! -n "$FUNCS" || echo $FUNCS
-test ! -n "$FUNCS"
+source "$top_srcdir"/symbols-check