summaryrefslogtreecommitdiffstats
path: root/arch/x86/entry/thunk_64.S
diff options
context:
space:
mode:
authorAndrea Righi <andrea.righi@canonical.com>2022-07-14 09:49:15 +0200
committerIngo Molnar <mingo@kernel.org>2022-08-04 12:23:50 +0200
commitde979c83574abf6e78f3fa65b716515c91b2613d (patch)
treec4ec84ab81c6550691e091fd4b414a618381b436 /arch/x86/entry/thunk_64.S
parent625395c4a0f4775e0fe00f616888d2e6c1ba49db (diff)
downloadlinux-stable-de979c83574abf6e78f3fa65b716515c91b2613d.tar.gz
linux-stable-de979c83574abf6e78f3fa65b716515c91b2613d.tar.bz2
linux-stable-de979c83574abf6e78f3fa65b716515c91b2613d.zip
x86/entry: Build thunk_$(BITS) only if CONFIG_PREEMPTION=y
With CONFIG_PREEMPTION disabled, arch/x86/entry/thunk_$(BITS).o becomes an empty object file. With some old versions of binutils (i.e., 2.35.90.20210113-1ubuntu1) the GNU assembler doesn't generate a symbol table for empty object files and objtool fails with the following error when a valid symbol table cannot be found: arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table To prevent this from happening, build thunk_$(BITS).o only if CONFIG_PREEMPTION is enabled. BugLink: https://bugs.launchpad.net/bugs/1911359 Fixes: 320100a5ffe5 ("x86/entry: Remove the TRACE_IRQS cruft") Signed-off-by: Andrea Righi <andrea.righi@canonical.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/Ys/Ke7EWjcX+ZlXO@arighi-desktop
Diffstat (limited to 'arch/x86/entry/thunk_64.S')
-rw-r--r--arch/x86/entry/thunk_64.S4
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/entry/thunk_64.S b/arch/x86/entry/thunk_64.S
index 505b488fcc65..f38b07d2768b 100644
--- a/arch/x86/entry/thunk_64.S
+++ b/arch/x86/entry/thunk_64.S
@@ -31,14 +31,11 @@ SYM_FUNC_END(\name)
_ASM_NOKPROBE(\name)
.endm
-#ifdef CONFIG_PREEMPTION
THUNK preempt_schedule_thunk, preempt_schedule
THUNK preempt_schedule_notrace_thunk, preempt_schedule_notrace
EXPORT_SYMBOL(preempt_schedule_thunk)
EXPORT_SYMBOL(preempt_schedule_notrace_thunk)
-#endif
-#ifdef CONFIG_PREEMPTION
SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore)
popq %r11
popq %r10
@@ -53,4 +50,3 @@ SYM_CODE_START_LOCAL_NOALIGN(__thunk_restore)
RET
_ASM_NOKPROBE(__thunk_restore)
SYM_CODE_END(__thunk_restore)
-#endif