Skip to content
Commit 4b8a5cfb authored by Xiao Yang's avatar Xiao Yang Committed by Masahiro Yamada
Browse files

modpost: Get proper section index by get_secindex() instead of st_shndx

(uint16_t) st_shndx is limited to 65535(i.e. SHN_XINDEX) so sym_get_data() gets
wrong section index by st_shndx if requested symbol contains extended section
index that is more than 65535.  In this case, we need to get proper section index
by .symtab_shndx section.

Module.symvers generated by building kernel with "-ffunction-sections -fdata-sections"
shows the issue.

Fixes: 56067812 ("kbuild: modversions: add infrastructure for emitting relative CRCs")
Fixes: e84f9fbb

 ("modpost: refactor namespace_from_kstrtabns() to not hard-code section name")
Signed-off-by: default avatarXiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 785d74ec
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