]> git.baikalelectronics.ru Git - kernel.git/commit
init: lto: fix PREL32 relocations
authorSami Tolvanen <samitolvanen@google.com>
Fri, 11 Dec 2020 18:46:25 +0000 (10:46 -0800)
committerKees Cook <keescook@chromium.org>
Thu, 14 Jan 2021 16:21:09 +0000 (08:21 -0800)
commitc9b4b74fa559215de5470ddb912de6f3aab9be5f
tree5ceafe2e591f632f348625eb485203b0913688e8
parent23d9035c193d716450f89ff009075878e944438d
init: lto: fix PREL32 relocations

With LTO, the compiler can rename static functions to avoid global
naming collisions. As initcall functions are typically static,
renaming can break references to them in inline assembly. This
change adds a global stub with a stable name for each initcall to
fix the issue when PREL32 relocations are used.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20201211184633.3213045-9-samitolvanen@google.com
include/linux/init.h