]> git.baikalelectronics.ru Git - kernel.git/commit
x86/asm: Mark all top level asm statements as .text
authorAndi Kleen <ak@linux.intel.com>
Sat, 30 Mar 2019 00:47:35 +0000 (17:47 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 19 Apr 2019 15:46:55 +0000 (17:46 +0200)
commitaeb580e85d147637ffbb2273eb71fa91bb5d7996
tree7e999ad5ac9a9b33d5d57688f7868d69fc1700c7
parent34ef1c7063547cb493e78b52c358fdb6e0feb380
x86/asm: Mark all top level asm statements as .text

With gcc toplevel assembler statements that do not mark themselves as .text
may end up in other sections. This causes LTO boot crashes because various
assembler statements ended up in the middle of the initcall section. It's
also a latent problem without LTO, although it's currently not known to
cause any real problems.

According to the gcc team it's expected behavior.

Always mark all the top level assembler statements as text so that they
switch to the right section.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190330004743.29541-1-andi@firstfloor.org
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/kprobes/core.c
arch/x86/lib/error-inject.c