]> git.baikalelectronics.ru Git - kernel.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)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 21 Nov 2018 14:57:32 +0000 (23:57 +0900)
commit57719add4a9db9d4cc345c2a2d552f28c9a379d7
tree578923fbf0c0cda1be816c465aa46547c7e44bad
parent12d4d1efcc6aa8261f302c097d7b90ad16b8920e
modpost: validate symbol names also in find_elf_symbol

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>
scripts/mod/modpost.c