From 91339ba3acf80872611c9fc2b27006030cf675f4 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Sat, 3 Feb 2024 21:18:59 +0000 Subject: [PATCH] fiber fix wrong asm directives on (default) solaris build mode. Illumos/Solaris while being 64 bits produces by default 32 bits build. In this case building the i386 assembly. --- Zend/asm/jump_x86_64_sysv_elf_gas.S | 16 ++++++++++------ Zend/asm/make_x86_64_sysv_elf_gas.S | 16 ++++++++++------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/Zend/asm/jump_x86_64_sysv_elf_gas.S b/Zend/asm/jump_x86_64_sysv_elf_gas.S index 40f8734daeeb1..35ed530197374 100644 --- a/Zend/asm/jump_x86_64_sysv_elf_gas.S +++ b/Zend/asm/jump_x86_64_sysv_elf_gas.S @@ -31,13 +31,16 @@ * * ****************************************************************************************/ -# if defined __CET__ -# include -# define SHSTK_ENABLED (__CET__ & 0x2) -# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# ifdef __i386__ +# include "jump_i386_sysv_elf_gas.S" # else -# define _CET_ENDBR -# endif +# if defined __CET__ +# include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# else +# define _CET_ENDBR +# endif .file "jump_x86_64_sysv_elf_gas.S" .text .globl jump_fcontext @@ -148,3 +151,4 @@ jump_fcontext: /* Mark that we don't need executable stack. */ .section .note.GNU-stack,"",%progbits +#endif diff --git a/Zend/asm/make_x86_64_sysv_elf_gas.S b/Zend/asm/make_x86_64_sysv_elf_gas.S index 3358a27d844df..b0d0c0341ef33 100644 --- a/Zend/asm/make_x86_64_sysv_elf_gas.S +++ b/Zend/asm/make_x86_64_sysv_elf_gas.S @@ -31,13 +31,16 @@ * * ****************************************************************************************/ -# if defined __CET__ -# include -# define SHSTK_ENABLED (__CET__ & 0x2) -# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# ifdef __i386__ +# include "make_i386_sysv_elf_gas.S" # else -# define _CET_ENDBR -# endif +# if defined __CET__ +# include +# define SHSTK_ENABLED (__CET__ & 0x2) +# define BOOST_CONTEXT_SHADOW_STACK (SHSTK_ENABLED && SHADOW_STACK_SYSCALL) +# else +# define _CET_ENDBR +# endif .file "make_x86_64_sysv_elf_gas.S" .text .globl make_fcontext @@ -184,3 +187,4 @@ finish: /* Mark that we don't need executable stack. */ .section .note.GNU-stack,"",%progbits +# endif