[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20201228032646.341547-1-hjl.tools@gmail.com>
Date: Sun, 27 Dec 2020 19:26:46 -0800
From: "H.J. Lu" <hjl.tools@...il.com>
To: linux-kernel@...r.kernel.org
Subject: [PATCH] x86: Include thunk_$(BITS).o only if CONFIG_PREEMPTION=y
The newer GNU assembler may not generate a symbol table for the empty
object file. Since objtool doesn't like empty object files without
symbol table and thunk_$(BITS).o doesn't have a symbol table when
CONFIG_PREEMPTION isn't enabled, include thunk_$(BITS).o only if
CONFIG_PREEMPTION is enabled.
Signed-off-by: H.J. Lu <hjl.tools@...il.com>
---
arch/x86/entry/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/entry/Makefile b/arch/x86/entry/Makefile
index 08bf95dbc911..83c98dae74a6 100644
--- a/arch/x86/entry/Makefile
+++ b/arch/x86/entry/Makefile
@@ -21,12 +21,13 @@ CFLAGS_syscall_64.o += $(call cc-option,-Wno-override-init,)
CFLAGS_syscall_32.o += $(call cc-option,-Wno-override-init,)
CFLAGS_syscall_x32.o += $(call cc-option,-Wno-override-init,)
-obj-y := entry_$(BITS).o thunk_$(BITS).o syscall_$(BITS).o
+obj-y := entry_$(BITS).o syscall_$(BITS).o
obj-y += common.o
obj-y += vdso/
obj-y += vsyscall/
+obj-$(CONFIG_PREEMPTION) += thunk_$(BITS).o
obj-$(CONFIG_IA32_EMULATION) += entry_64_compat.o syscall_32.o
obj-$(CONFIG_X86_X32_ABI) += syscall_x32.o
--
2.29.2
Powered by blists - more mailing lists