amdgpu: convert to new symbols check

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
main
Eric Engestrom 2019-10-23 23:32:54 +01:00 committed by Eric Engestrom
parent 303cf6bbf3
commit 791297e94d
2 changed files with 7 additions and 23 deletions

View File

@ -1,17 +1,3 @@
#!/bin/sh
set -u
# 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 ) <<EOF
__bss_start
_edata
_end
_fini
_init
amdgpu_bo_alloc
amdgpu_bo_cpu_map
amdgpu_bo_cpu_unmap
@ -86,8 +72,3 @@ amdgpu_va_range_free
amdgpu_va_range_query
amdgpu_vm_reserve_vmid
amdgpu_vm_unreserve_vmid
EOF
done)
test ! -n "$FUNCS" || echo $FUNCS
test ! -n "$FUNCS"

View File

@ -58,8 +58,11 @@ ext_libdrm_amdgpu = declare_dependency(
)
test(
'amdgpu-symbol-check',
find_program('amdgpu-symbol-check'),
env : env_test,
args : libdrm_amdgpu,
'amdgpu-symbols-check',
symbols_check,
args : [
'--lib', libdrm_amdgpu,
'--symbols-file', files('amdgpu-symbols.txt'),
'--nm', prog_nm.path(),
],
)