[PATCH libdrm 10/24] freedreno: add symbols test

Emil Velikov emil.l.velikov at gmail.com
Wed Apr 1 09:15:21 PDT 2015


Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 freedreno/Makefile.am            |  3 ++-
 freedreno/freedreno-symbol-check | 52 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100755 freedreno/freedreno-symbol-check

diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am
index 407ab70..27e6aa6 100644
--- a/freedreno/Makefile.am
+++ b/freedreno/Makefile.am
@@ -24,4 +24,5 @@ libdrm_freedrenocommoninclude_HEADERS = $(LIBDRM_FREEDRENO_H_FILES)
 pkgconfigdir = @pkgconfigdir@
 pkgconfig_DATA = libdrm_freedreno.pc
 
-EXTRA_DIST = Android.mk
+TESTS = freedreno-symbol-check
+EXTRA_DIST = Android.mk $(TESTS)
diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
new file mode 100755
index 0000000..7115448
--- /dev/null
+++ b/freedreno/freedreno-symbol-check
@@ -0,0 +1,52 @@
+#!/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/LIBDRM_FREEDRENO_H_FILES
+
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
+( grep -q "^$func$" || echo $func )  <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+fd_bo_cpu_fini
+fd_bo_cpu_prep
+fd_bo_del
+fd_bo_dmabuf
+fd_bo_from_dmabuf
+fd_bo_from_fbdev
+fd_bo_from_handle
+fd_bo_from_name
+fd_bo_get_name
+fd_bo_handle
+fd_bo_map
+fd_bo_new
+fd_bo_ref
+fd_bo_size
+fd_device_del
+fd_device_new
+fd_device_new_dup
+fd_device_ref
+fd_pipe_del
+fd_pipe_get_param
+fd_pipe_new
+fd_pipe_wait
+fd_ringbuffer_del
+fd_ringbuffer_emit_reloc_ring
+fd_ringbuffer_flush
+fd_ringbuffer_new
+fd_ringbuffer_reloc
+fd_ringbuffer_reset
+fd_ringbuffer_set_parent
+fd_ringbuffer_timestamp
+fd_ringmarker_del
+fd_ringmarker_dwords
+fd_ringmarker_flush
+fd_ringmarker_mark
+fd_ringmarker_new
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"
-- 
2.3.1



More information about the dri-devel mailing list