summaryrefslogtreecommitdiff
path: root/amdgpu/amdgpu-symbol-check
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-08-07 17:29:11 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-08-13 17:43:39 +0100
commit15350568ccae525899aeb963f1cb66287e876e63 (patch)
tree3eee9c7c44aa7a1d2466a61dbfe1525913158a24 /amdgpu/amdgpu-symbol-check
parentbddf4df4a17df30624f27c5e85f859a1b09f8fc0 (diff)
amdgpu: add symbols check test
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'amdgpu/amdgpu-symbol-check')
-rwxr-xr-xamdgpu/amdgpu-symbol-check51
1 files changed, 51 insertions, 0 deletions
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 ) <<EOF
+__bss_start
+_edata
+_end
+_fini
+_init
+amdgpu_bo_alloc
+amdgpu_bo_cpu_map
+amdgpu_bo_cpu_unmap
+amdgpu_bo_export
+amdgpu_bo_free
+amdgpu_bo_import
+amdgpu_bo_list_create
+amdgpu_bo_list_destroy
+amdgpu_bo_list_update
+amdgpu_bo_query_info
+amdgpu_bo_set_metadata
+amdgpu_bo_va_op
+amdgpu_bo_wait_for_idle
+amdgpu_create_bo_from_user_mem
+amdgpu_cs_ctx_create
+amdgpu_cs_ctx_free
+amdgpu_cs_query_fence_status
+amdgpu_cs_query_reset_state
+amdgpu_cs_submit
+amdgpu_device_deinitialize
+amdgpu_device_initialize
+amdgpu_query_buffer_size_alignment
+amdgpu_query_crtc_from_id
+amdgpu_query_firmware_version
+amdgpu_query_gds_info
+amdgpu_query_gpu_info
+amdgpu_query_heap_info
+amdgpu_query_hw_ip_count
+amdgpu_query_hw_ip_info
+amdgpu_query_info
+amdgpu_read_mm_registers
+amdgpu_va_range_alloc
+amdgpu_va_range_free
+amdgpu_va_range_query
+EOF
+done)
+
+test ! -n "$FUNCS" || echo $FUNCS
+test ! -n "$FUNCS"