2009-01-10 14:03:47 +01:00
|
|
|
#! /bin/bash
|
2008-07-18 12:15:21 +02:00
|
|
|
|
2009-01-10 14:03:47 +01:00
|
|
|
# these are updated by the spec file
|
2008-10-28 00:21:37 +01:00
|
|
|
sourcedir=${0%/*}
|
2008-11-23 08:54:06 +01:00
|
|
|
|
2009-01-10 14:03:47 +01:00
|
|
|
filelist=$(mktemp -t ${0##*/}.XXXXXXXXXX)
|
|
|
|
trap "rm -f $filelist" EXIT
|
|
|
|
cat >"$filelist"
|
2008-10-28 00:21:37 +01:00
|
|
|
flavor=${1##*-}
|
|
|
|
|
2009-01-10 14:03:47 +01:00
|
|
|
/usr/lib/rpm/find-provides "$@" <"$filelist"
|
|
|
|
|
2009-05-25 00:39:22 +02:00
|
|
|
case `uname -m` in
|
|
|
|
ia64)
|
|
|
|
image="vmlinuz"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
image="vmlinux"
|
|
|
|
esac
|
|
|
|
while read f; do
|
|
|
|
test -e "$f" || continue
|
|
|
|
case "$f" in
|
|
|
|
*.ko | */$image* )
|
|
|
|
echo "$f"
|
|
|
|
esac
|
|
|
|
done <"$filelist" | \
|
|
|
|
xargs -r $sourcedir/symsets.pl --list-exported-symbols | \
|
|
|
|
awk -v flavor="$flavor" '
|
2009-01-10 14:03:47 +01:00
|
|
|
{
|
2009-03-24 20:26:04 +01:00
|
|
|
sub(/^0x0*/, "", $1);
|
|
|
|
if (!$1)
|
|
|
|
$1 = "0";
|
|
|
|
printf "ksym(%s:%s) = %s\n", flavor, $2, $1
|
|
|
|
}'
|
2009-01-10 14:03:47 +01:00
|
|
|
|
|
|
|
exit 0
|
2008-11-23 08:54:06 +01:00
|
|
|
|