find-requires.ksyms: call readelf -R on the sectname and not hard-coded .rodata

* find-requires.ksyms (all_provides): Pass $sectname to the readelf -R call.

Fixes: cd7e9e8a2f "find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing"
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
This commit is contained in:
Eugene Syromiatnikov 2023-05-17 09:29:10 +02:00
parent 0a8324122a
commit 459cc0478d

View File

@ -51,7 +51,7 @@ all_provides() {
| while read sectname; do
[ -n "$sectname" ] || continue
ELFSECTDATA=$(readelf -R .rodata "$module" | awk '/0x/{printf $2$3$4$5}')
ELFSECTDATA=$(readelf -R "$sectname" "$module" | awk '/0x/{printf $2$3$4$5}')
if [[ -n $(readelf -h "$module" | grep "little endian") ]]; then
SECTDATA=$(echo $ELFSECTDATA | sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/g')
else