From 15350568ccae525899aeb963f1cb66287e876e63 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 7 Aug 2015 17:29:11 +0100 Subject: [PATCH] amdgpu: add symbols check test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Jammy Zhou --- amdgpu/Makefile.am | 3 +++ amdgpu/amdgpu-symbol-check | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100755 amdgpu/amdgpu-symbol-check diff --git a/amdgpu/Makefile.am b/amdgpu/Makefile.am index 82e78c7f..ed97803f 100644 --- a/amdgpu/Makefile.am +++ b/amdgpu/Makefile.am @@ -52,3 +52,6 @@ libdrm_amdgpuinclude_HEADERS = \ pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = libdrm_amdgpu.pc + +TESTS = amdgpu-symbol-check +EXTRA_DIST = $(TESTS) diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check new file mode 100755 index 00000000..9a0b36cb --- /dev/null +++ b/amdgpu/amdgpu-symbol-check @@ -0,0 +1,51 @@ +#!/bin/bash + +# The following symbols (past the first five) are taken from the public headers. +# A list of the latter should be available Makefile.am/libdrm_amdgpuinclude_HEADERS + +FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '{print $3}' | while read func; do +( grep -q "^$func$" || echo $func ) <