Skip to content
Commit e84f9fbb authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

modpost: refactor namespace_from_kstrtabns() to not hard-code section name



Currently, namespace_from_kstrtabns() relies on the fact that
namespace strings are recorded in the __ksymtab_strings section.
Actually, it is coded in include/linux/export.h, but modpost does
not need to hard-code the section name.

Elf_Sym::st_shndx holds the index of the relevant section. Using it is
a more portable way to get the namespace string.

Make namespace_from_kstrtabns() simply call sym_get_data(), and delete
the info->ksymtab_strings .

While I was here, I added more 'const' qualifiers to pointers.

Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent afa0459d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment