]> www.infradead.org Git - users/jedix/linux-maple.git/commit
modpost: validate symbol names also in find_elf_symbol
authorSami Tolvanen <samitolvanen@google.com>
Tue, 23 Oct 2018 22:15:35 +0000 (15:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:45:59 +0000 (19:45 +0100)
commit20a7ded03f97005cd282f419bf35f22ab2ec74fc
tree29ac70a9fa91b78a9287c83fd99006aaca4634ca
parent17c8a0d7e13bae92cc819c9060a0d39b3ce860c5
modpost: validate symbol names also in find_elf_symbol

[ Upstream commit 5818c683a619c534c113e1f66d24f636defc29bc ]

If an ARM mapping symbol shares an address with a valid symbol,
find_elf_symbol can currently return the mapping symbol instead, as the
symbol is not validated. This can result in confusing warnings:

  WARNING: vmlinux.o(.text+0x18f4028): Section mismatch in reference
  from the function set_reset_devices() to the variable .init.text:$x.0

This change adds a call to is_valid_name to find_elf_symbol, similarly
to how it's already used in find_elf_symbol2.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/mod/modpost.c