@@ -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 @@ -14,16 +14,24 @@ */ #include "config.h" #include "platform.h" + +#ifdef HAVE_CET_H +# include +#else +# define _CET_ENDBR +#endif .globl OFForward .globl OFForward_stret .section .text OFForward: + _CET_ENDBR + pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp @@ -84,10 +92,12 @@ jmp *%eax .type OFForward, %function .size OFForward, .-OFForward OFForward_stret: + _CET_ENDBR + pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp @@ -148,10 +158,12 @@ jmp *%eax .type OFForward_stret, %function .size OFForward_stret, .-OFForward_stret init: + _CET_ENDBR + pushl %ebp movl %esp, %ebp pushl %ebx subl $4, %esp