From 027d6260146f782c75de45ac896ea97d546685f4 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Tue, 16 May 2023 09:02:59 +0200 Subject: [PATCH] find-provides.ksyms, find-requires.ksyms: filter local __crc_* symbols as well Apparently, these are local in the recent kernels. * find-provides.ksyms (all_provides): Filter local __crc_* symbols in additional to global in the objdump -t call output. * find-requires.ksyms: Likewise. Signed-off-by: Eugene Syromiatnikov --- find-provides.ksyms | 4 ++-- find-requires.ksyms | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/find-provides.ksyms b/find-provides.ksyms index b01f057..74556e9 100755 --- a/find-provides.ksyms +++ b/find-provides.ksyms @@ -46,7 +46,7 @@ for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') "$@"; do | sort -u else objdump -t "$module" \ - | sed -n 's/^[0-9a-f][0-9a-f]* g...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \ + | sed -n 's/^[0-9a-f][0-9a-f]* [gl]...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \ | sort -u \ | while read sectname; do [ -n "$sectname" ] || continue @@ -63,7 +63,7 @@ for module in $(grep -E '/lib/modules/.+\.ko(\.gz|\.bz2|\.xz|\.zst)?$') "$@"; do -v 'dep_pfx='"$dep_pfx" \ -v 'sectdata='"$SECTDATA" \ --non-decimal-data \ - 'match($0, /^([0-9a-f]+) g...... .* [0-9a-f]+ __crc_(.*)$/, a) { printf("%s(%s) = 0x%08s\n", dep_pfx, a[2], substr(sectdata, (strtonum("0x" a[1]) * 2) + 1, 8)) }' + 'match($0, /^([0-9a-f]+) [gl]...... .* [0-9a-f]+ __crc_(.*)$/, a) { printf("%s(%s) = 0x%08s\n", dep_pfx, a[2], substr(sectdata, (strtonum("0x" a[1]) * 2) + 1, 8)) }' done \ | sort -u fi diff --git a/find-requires.ksyms b/find-requires.ksyms index 1890db5..13bad46 100755 --- a/find-requires.ksyms +++ b/find-requires.ksyms @@ -46,7 +46,7 @@ all_provides() { '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]* g...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \ + | sed -n 's/^[0-9a-f][0-9a-f]* [gl]...... \(.*\) [0-9a-f][0-9a-f]* __crc_.*$/\1/p' \ | sort -u \ | while read sectname; do [ -n "$sectname" ] || continue @@ -63,7 +63,7 @@ all_provides() { -v 'dep_pfx='"$dep_pfx" \ -v 'sectdata='"$SECTDATA" \ --non-decimal-data \ - 'match($0, /^([0-9a-f]+) g...... .* [0-9a-f]+ __crc_(.*)$/, a) { printf("%s(%s) = 0x%08s\n", dep_pfx, a[2], substr(sectdata, (strtonum("0x" a[1]) * 2) + 1, 8)) }' + 'match($0, /^([0-9a-f]+) [gl]...... .* [0-9a-f]+ __crc_(.*)$/, a) { printf("%s(%s) = 0x%08s\n", dep_pfx, a[2], substr(sectdata, (strtonum("0x" a[1]) * 2) + 1, 8)) }' done fi