summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/perlasm
diff options
context:
space:
mode:
authortb <>2024-02-24 15:30:14 +0000
committertb <>2024-02-24 15:30:14 +0000
commitc10c5b524e3121f42c9239d737dd7f975638f378 (patch)
tree162dfb371639bf1514d472f64e2a4d1279851907 /src/lib/libcrypto/perlasm
parent1f31ec76cd83a26559f7a7ee2623bce8b503473d (diff)
downloadopenbsd-c10c5b524e3121f42c9239d737dd7f975638f378.tar.gz
openbsd-c10c5b524e3121f42c9239d737dd7f975638f378.tar.bz2
openbsd-c10c5b524e3121f42c9239d737dd7f975638f378.zip
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
Diffstat (limited to 'src/lib/libcrypto/perlasm')
-rwxr-xr-xsrc/lib/libcrypto/perlasm/x86_64-xlate.pl16
1 files changed, 16 insertions, 0 deletions
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 @@ ___
781OPTION DOTNAME 781OPTION DOTNAME
782___ 782___
783} 783}
784
785if ($nasm) {
786 print <<___;
787\%define _CET_ENDBR
788___
789} else {
790 print <<___;
791#if defined(__CET__)
792#include <cet.h>
793#else
794#define _CET_ENDBR
795#endif
796
797___
798}
799
784print "#include \"x86_arch.h\"\n"; 800print "#include \"x86_arch.h\"\n";
785 801
786while($line=<>) { 802while($line=<>) {