modpost: pass section index to find_elf_symbol2()
authorMasahiro Yamada <masahiroy@kernel.org>
Sun, 14 May 2023 15:27:27 +0000 (00:27 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 22 May 2023 01:34:38 +0000 (10:34 +0900)
commit9990ca35870b7c57d39f8b325d676dfd028035b4
tree2b4e8f770e87f3215648cb6aaaaa6df93ba39a09
parentdbf7cc2e4e78dfecad02ff17ff5c9971b42da462
modpost: pass section index to find_elf_symbol2()

find_elf_symbol2() converts the section index to the section name,
then compares the two strings in each iteration. This is slow.

It is faster to compare the section indices (i.e. integers) directly.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
scripts/mod/modpost.c