tegra: convert to new symbols check

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
main
Eric Engestrom 2019-10-23 23:32:55 +01:00 committed by Eric Engestrom
parent 451e054328
commit dbd4320ad6
3 changed files with 20 additions and 39 deletions

View File

@ -46,8 +46,11 @@ pkg.generate(
)
test(
'tegra-symbol-check',
find_program('tegra-symbol-check'),
env : env_test,
args : libdrm_tegra,
'tegra-symbols-check',
symbols_check,
args : [
'--lib', libdrm_tegra,
'--symbols-file', files('tegra-symbols.txt'),
'--nm', prog_nm.path(),
],
)

View File

@ -1,35 +0,0 @@
#!/bin/sh
set -u
# The following symbols (past the first nine) are taken from tegra.h.
FUNCS=$($NM -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
( grep -q "^$func$" || echo $func ) <<EOF
__bss_end__
__bss_start__
__bss_start
__end__
_bss_end__
_edata
_end
_fini
_init
drm_tegra_bo_get_flags
drm_tegra_bo_get_handle
drm_tegra_bo_get_tiling
drm_tegra_bo_map
drm_tegra_bo_new
drm_tegra_bo_ref
drm_tegra_bo_set_flags
drm_tegra_bo_set_tiling
drm_tegra_bo_unmap
drm_tegra_bo_unref
drm_tegra_bo_wrap
drm_tegra_close
drm_tegra_new
EOF
done)
test ! -n "$FUNCS" || echo $FUNCS
test ! -n "$FUNCS"

13
tegra/tegra-symbols.txt Normal file
View File

@ -0,0 +1,13 @@
drm_tegra_bo_get_flags
drm_tegra_bo_get_handle
drm_tegra_bo_get_tiling
drm_tegra_bo_map
drm_tegra_bo_new
drm_tegra_bo_ref
drm_tegra_bo_set_flags
drm_tegra_bo_set_tiling
drm_tegra_bo_unmap
drm_tegra_bo_unref
drm_tegra_bo_wrap
drm_tegra_close
drm_tegra_new