diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-14 18:42:22 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-11-23 04:44:24 +0100 |
commit | e84f9fbbece1585f45a03ccc11eeabe121cadc1b (patch) | |
tree | 8fcbd511a90a6bf6b986b1fc101c151c86353923 /scripts/mod/modpost.h | |
parent | modpost: add a helper to get data pointed by a symbol (diff) | |
download | linux-e84f9fbbece1585f45a03ccc11eeabe121cadc1b.tar.xz linux-e84f9fbbece1585f45a03ccc11eeabe121cadc1b.zip |
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: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/mod/modpost.h')
-rw-r--r-- | scripts/mod/modpost.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index fe6652535e4b..64a82d2d85f6 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -143,7 +143,6 @@ struct elf_info { Elf_Section export_gpl_sec; Elf_Section export_unused_gpl_sec; Elf_Section export_gpl_future_sec; - char *ksymtab_strings; char *strtab; char *modinfo; unsigned int modinfo_len; |