From 5d1646d90e1f2cceb9f0828f4b28318cd0ec7744 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 12:05:51 +0200 Subject: Adding upstream version 5.10.209. Signed-off-by: Daniel Baumann --- scripts/gen_ksymdeps.sh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 scripts/gen_ksymdeps.sh (limited to 'scripts/gen_ksymdeps.sh') diff --git a/scripts/gen_ksymdeps.sh b/scripts/gen_ksymdeps.sh new file mode 100755 index 000000000..725e8c9c1 --- /dev/null +++ b/scripts/gen_ksymdeps.sh @@ -0,0 +1,31 @@ +#!/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' | tr A-Z a-z) + +if [ -z "$ksyms" ]; then + exit 0 +fi + +echo +echo "ksymdeps_$1 := \\" + +for s in $ksyms +do + echo $s | sed -e 's:^_*: $(wildcard include/ksym/:' \ + -e 's:__*:/:g' -e 's/$/.h) \\/' +done + +echo +echo "$1: \$(ksymdeps_$1)" +echo +echo "\$(ksymdeps_$1):" -- cgit v1.2.3