@@ -14,19 +14,23 @@ */ #include "config.h" #include "platform.h" + +#ifdef HAVE_CET_H +# include +#else +# define _CET_ENDBR +#endif .globl _OFForward .globl _OFForward_stret .section __TEXT, __text, regular, pure_instructions _OFForward: -#ifdef HAVE_ENDBR64 - endbr64 -#endif + _CET_ENDBR pushq %rbp movq %rsp, %rbp /* Save all arguments */ @@ -107,13 +111,11 @@ popq %rbp jmp _OFMethodNotFound _OFForward_stret: -#ifdef HAVE_ENDBR64 - endbr64 -#endif + _CET_ENDBR pushq %rbp movq %rsp, %rbp /* Save all arguments */ @@ -196,13 +198,11 @@ popq %rbp jmp _OFMethodNotFound_stret init: -#ifdef HAVE_ENDBR64 - endbr64 -#endif + _CET_ENDBR leaq module(%rip), %rdi jmp ___objc_exec_class .section __DATA, __mod_init_func, mod_init_funcs