From c730c3b3b1845cc7c4a4aceff2031f1135faa6bb Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 24 Feb 2024 15:30:14 +0000 Subject: Replace uses of endbr64 with _CET_ENDBR from cet.h cet.h is needed for other platforms to emit the relevant .gnu.properties sections that are necessary for them to enable IBT. It also avoids issues with older toolchains on macOS that explode on encountering endbr64. based on a diff by kettenis ok beck kettenis --- src/lib/libcrypto/perlasm/x86_64-xlate.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/lib/libcrypto/perlasm') diff --git a/src/lib/libcrypto/perlasm/x86_64-xlate.pl b/src/lib/libcrypto/perlasm/x86_64-xlate.pl index 5dbed2a8c4..325e7cf583 100755 --- a/src/lib/libcrypto/perlasm/x86_64-xlate.pl +++ b/src/lib/libcrypto/perlasm/x86_64-xlate.pl @@ -781,6 +781,22 @@ ___ OPTION DOTNAME ___ } + +if ($nasm) { + print <<___; +\%define _CET_ENDBR +___ +} else { + print <<___; +#if defined(__CET__) +#include +#else +#define _CET_ENDBR +#endif + +___ +} + print "#include \"x86_arch.h\"\n"; while($line=<>) { -- cgit v1.2.3-55-g6feb