From 552de225bf2740ba0cb52312c21353d71d934b8c Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Sun, 5 Apr 2015 15:51:28 +0100 Subject: radeon: add symbols test Will allow us to catch when the library exports more symbols than the ones in the public headers. Signed-off-by: Emil Velikov --- radeon/Makefile.am | 2 +- radeon/radeon-symbol-check | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100755 radeon/radeon-symbol-check diff --git a/radeon/Makefile.am b/radeon/Makefile.am index 1e4c8691..d9d0b7ec 100644 --- a/radeon/Makefile.am +++ b/radeon/Makefile.am @@ -44,4 +44,4 @@ libdrm_radeoninclude_HEADERS = $(LIBDRM_RADEON_H_FILES) pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = libdrm_radeon.pc -EXTRA_DIST = Android.mk $(LIBDRM_RADEON_BOF_FILES) +EXTRA_DIST = Android.mk $(LIBDRM_RADEON_BOF_FILES) $(TESTS) diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check new file mode 100755 index 00000000..0bf2ffcb --- /dev/null +++ b/radeon/radeon-symbol-check @@ -0,0 +1,61 @@ +#!/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_RADEON_H_FILES + +FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do +( grep -q "^$func$" || echo $func ) <