@@ -1,7 +1,7 @@ /* - * Copyright (c) 2008-2023 Jonathan Schleifer + * Copyright (c) 2008-2024 Jonathan Schleifer * * All rights reserved. * * This file is part of ObjFW. It may be distributed under the terms of the * Q Public License 1.0, which can be found in the file LICENSE.QPL included in @@ -12,16 +12,24 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" + +#ifdef HAVE_CET_H +# include +#else +# define _CET_ENDBR +#endif .globl OFForward .globl OFForward_stret .section .text OFForward: + _CET_ENDBR + pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0x90, %rsp /* 16-byte alignment */ @@ -93,10 +101,12 @@ .scl 2 .type 32 .endef OFForward_stret: + _CET_ENDBR + pushq %rbp movq %rsp, %rbp /* Save all arguments */ subq $0x90, %rsp /* 16-byte alignment */ @@ -170,10 +180,12 @@ .scl 2 .type 32 .endef init: + _CET_ENDBR + leaq module(%rip), %rcx jmp __objc_exec_class .section .ctors, "aw" .quad init