find-provides.ksyms: factor out the output sorting
To bring it more in line with the implementation in find-requires.ksyms. Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
This commit is contained in:
parent
0f60c336b4
commit
5910d31329
@ -42,8 +42,7 @@ for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') "$@"; do
|
||||
| awk \
|
||||
-v 'dep_pfx='"$dep_pfx" \
|
||||
--non-decimal-data \
|
||||
'match($0, /^([0-9a-f]+) A __crc_(.+)/, a) { printf("%s(%s) = 0x%08x\n", dep_pfx, a[2], strtonum("0x" a[1])) }' \
|
||||
| sort -u
|
||||
'match($0, /^([0-9a-f]+) A __crc_(.+)/, a) { printf("%s(%s) = 0x%08x\n", dep_pfx, a[2], strtonum("0x" a[1])) }'
|
||||
else
|
||||
objdump -t "$module" \
|
||||
| sed -n 's/^[0-9a-f][0-9a-f]* [gl]...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \
|
||||
@ -65,9 +64,9 @@ for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') "$@"; do
|
||||
-v 'sectname='"$sectname" \
|
||||
--non-decimal-data \
|
||||
'match($0, /^([0-9a-f]+) [gl]...... (.*) [0-9a-f]+ __crc_(.*)$/, a) && a[2] == sectname { printf("%s(%s) = 0x%08s\n", dep_pfx, a[3], substr(sectdata, (strtonum("0x" a[1]) * 2) + 1, 8)) }'
|
||||
done \
|
||||
| sort -u
|
||||
done
|
||||
fi
|
||||
|
||||
[ -z "$tmpfile" ] || rm -f -- "$tmpfile"
|
||||
done
|
||||
done \
|
||||
| sort -k1,1 -u
|
||||
|
Loading…
Reference in New Issue
Block a user