linux-stable/scripts/mod
Sami Tolvanen b6293e6c90 modpost: validate symbol names also in find_elf_symbol
[ Upstream commit 5818c683a6 ]

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>
2019-02-12 19:47:01 +01:00
..
.gitignore kbuild: trivial - remove trailing empty lines 2014-06-10 00:04:06 +02:00
devicetable-offsets.c usb: typec: Bus type for alternate modes 2018-07-02 17:42:36 +02:00
empty.c
file2alias.c usb: typec: Bus type for alternate modes 2018-07-02 17:42:36 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mk_elfconfig.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
modpost.c modpost: validate symbol names also in find_elf_symbol 2019-02-12 19:47:01 +01:00
modpost.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sumversion.c modpost: delete stale comment 2018-05-03 01:17:44 +09:00