From 2d6eef74b588b7d7ffb406ac3a23dc0e25f0287e Mon Sep 17 00:00:00 2001 From: wangchengdong Date: Tue, 23 Dec 2025 11:08:17 +0800 Subject: [PATCH] arch/x86: Add support to disable signals actions related data struct Add support to disable signals actions related struct Co-authored-by: guoshichao Signed-off-by: Chengdong Wang --- arch/x86/include/i486/irq.h | 3 ++- arch/x86/src/qemu/Make.defs | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/i486/irq.h b/arch/x86/include/i486/irq.h index a464d136991..20f76da9a19 100644 --- a/arch/x86/include/i486/irq.h +++ b/arch/x86/include/i486/irq.h @@ -153,6 +153,7 @@ #ifndef __ASSEMBLY__ struct xcptcontext { +#ifdef CONFIG_ENABLE_ALL_SIGNALS /* These are saved copies of instruction pointer and EFLAGS used during * signal processing. * @@ -164,7 +165,7 @@ struct xcptcontext uint32_t saved_eip; uint32_t saved_eflags; - +#endif /* Register save area */ uint32_t regs[XCPTCONTEXT_REGS]; diff --git a/arch/x86/src/qemu/Make.defs b/arch/x86/src/qemu/Make.defs index 893ad50af4b..034d5ca5bc8 100644 --- a/arch/x86/src/qemu/Make.defs +++ b/arch/x86/src/qemu/Make.defs @@ -34,8 +34,12 @@ CMN_CSRCS += x86_getintstack.c x86_initialize.c CMN_CSRCS += x86_modifyreg8.c x86_modifyreg16.c x86_modifyreg32.c CMN_CSRCS += x86_nputs.c x86_switchcontext.c x86_tcbinfo.c CMN_CSRCS += i486_irq.c i486_regdump.c i486_releasestack.c -CMN_CSRCS += i486_savestate.c i486_sigdeliver.c i486_stackframe.c -CMN_CSRCS += i486_schedulesigaction.c i486_usestack.c +CMN_CSRCS += i486_savestate.c i486_stackframe.c +CMN_CSRCS += i486_usestack.c + +ifeq ($(CONFIG_ENABLE_ALL_SIGNALS),y) +CMN_CSRCS += i486_schedulesigaction.c i486_sigdeliver.c +endif # Required QEMU files