All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Include thunk_$(BITS).o only if CONFIG_PREEMPTION=y
@ 2020-12-28  3:26 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2020-12-28  3:26 UTC (permalink / raw)
  To: linux-kernel

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@gmail.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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-28  3:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28  3:26 [PATCH] x86: Include thunk_$(BITS).o only if CONFIG_PREEMPTION=y H.J. Lu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.