aboutsummaryrefslogtreecommitdiffstats
path: root/tegra
diff options
context:
space:
mode:
authorEmil Velikov2015-03-31 14:14:58 -0500
committerEmil Velikov2015-04-28 05:19:15 -0500
commita814f933bf9fb25cf7b3cf82c69ba07ed2a686d0 (patch)
tree3e023a532d4cf4288ee1567094f3870d356fb746 /tegra
parent62b35fb2756ef37ff4bf3ac2eb5761d1fc95c089 (diff)
downloadexternal-libgbm-a814f933bf9fb25cf7b3cf82c69ba07ed2a686d0.tar.gz
external-libgbm-a814f933bf9fb25cf7b3cf82c69ba07ed2a686d0.tar.xz
external-libgbm-a814f933bf9fb25cf7b3cf82c69ba07ed2a686d0.zip
tegra: add symbols test
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'tegra')
-rw-r--r--tegra/Makefile.am3
-rwxr-xr-xtegra/tegra-symbol-check30
2 files changed, 33 insertions, 0 deletions
diff --git a/tegra/Makefile.am b/tegra/Makefile.am
index a6474879..efa14f9c 100644
--- a/tegra/Makefile.am
+++ b/tegra/Makefile.am
@@ -21,3 +21,6 @@ libdrm_tegrainclude_HEADERS = tegra.h
21 21
22pkgconfigdir = @pkgconfigdir@ 22pkgconfigdir = @pkgconfigdir@
23pkgconfig_DATA = libdrm_tegra.pc 23pkgconfig_DATA = libdrm_tegra.pc
24
25TESTS = tegra-symbol-check
26EXTRA_DIST = $(TESTS)
diff --git a/tegra/tegra-symbol-check b/tegra/tegra-symbol-check
new file mode 100755
index 00000000..40208311
--- /dev/null
+++ b/tegra/tegra-symbol-check
@@ -0,0 +1,30 @@
1#!/bin/bash
2
3# The following symbols (past the first five) are taken from the public headers.
4# A list of the latter should be available Makefile.sources/LIBDRM_FREEDRENO_H_FILES
5
6FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
7( grep -q "^$func$" || echo $func ) <<EOF
8__bss_start
9_edata
10_end
11_fini
12_init
13drm_tegra_bo_get_flags
14drm_tegra_bo_get_handle
15drm_tegra_bo_get_tiling
16drm_tegra_bo_map
17drm_tegra_bo_new
18drm_tegra_bo_ref
19drm_tegra_bo_set_flags
20drm_tegra_bo_set_tiling
21drm_tegra_bo_unmap
22drm_tegra_bo_unref
23drm_tegra_bo_wrap
24drm_tegra_close
25drm_tegra_new
26EOF
27done)
28
29test ! -n "$FUNCS" || echo $FUNCS
30test ! -n "$FUNCS"