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: fd79794323 "find-provides.ksyms, find-requires.ksyms: rewrite indirect CRC parsing"
Resolves: #2178935
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
This commit is contained in:
Eugene Syromiatnikov 2023-05-17 09:29:10 +02:00
parent 4ecf0dd22f
commit c0a9b49b96

View File

@ -52,7 +52,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