swh:1:snp:32555a3fd8878f019c2ebd6c964bc1edcaeff337
Raw File
Tip revision: ffb4d94b4314655cea60ab7962756e6bab72fc7e authored by Linus Torvalds on 30 September 2022, 23:25:52 UTC
Merge tag 'drm-fixes-2022-10-01' of git://anongit.freedesktop.org/drm/drm
Tip revision: ffb4d94
gen_ksymdeps.sh
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0

set -e

# List of exported symbols
#
# If the object has no symbol, $NM warns 'no symbols'.
# Suppress the stderr.
# TODO:
#   Use -q instead of 2>/dev/null when we upgrade the minimum version of
#   binutils to 2.37, llvm to 13.0.0.
ksyms=$($NM $1 2>/dev/null | sed -n 's/.*__ksym_marker_\(.*\)/\1/p')

if [ -z "$ksyms" ]; then
	exit 0
fi

echo
echo "ksymdeps_$1 := \\"

for s in $ksyms
do
	printf '    $(wildcard include/ksym/%s) \\\n' "$s"
done

echo
echo "$1: \$(ksymdeps_$1)"
echo
echo "\$(ksymdeps_$1):"
back to top