summaryrefslogtreecommitdiffstats
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorAndi Kleen2019-03-30 01:47:35 +0100
committerThomas Gleixner2019-04-19 17:46:55 +0200
commitc03e27506a564ec7db1b179e7464835901f49751 (patch)
tree7e999ad5ac9a9b33d5d57688f7868d69fc1700c7 /arch/x86/lib
parentx86/build/vdso: Add FORCE to the build rule of %.so (diff)
downloadkernel-qcow2-linux-c03e27506a564ec7db1b179e7464835901f49751.tar.gz
kernel-qcow2-linux-c03e27506a564ec7db1b179e7464835901f49751.tar.xz
kernel-qcow2-linux-c03e27506a564ec7db1b179e7464835901f49751.zip
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
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/error-inject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/lib/error-inject.c b/arch/x86/lib/error-inject.c
index 3cdf06128d13..be5b5fb1598b 100644
--- a/arch/x86/lib/error-inject.c
+++ b/arch/x86/lib/error-inject.c
@@ -6,6 +6,7 @@
asmlinkage void just_return_func(void);
asm(
+ ".text\n"
".type just_return_func, @function\n"
".globl just_return_func\n"
"just_return_func:\n"