diff options
author | tb <> | 2024-02-24 15:30:14 +0000 |
---|---|---|
committer | tb <> | 2024-02-24 15:30:14 +0000 |
commit | c10c5b524e3121f42c9239d737dd7f975638f378 (patch) | |
tree | 162dfb371639bf1514d472f64e2a4d1279851907 /src/lib/libcrypto/perlasm | |
parent | 1f31ec76cd83a26559f7a7ee2623bce8b503473d (diff) | |
download | openbsd-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-x | src/lib/libcrypto/perlasm/x86_64-xlate.pl | 16 |
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 @@ ___ | |||
781 | OPTION DOTNAME | 781 | OPTION DOTNAME |
782 | ___ | 782 | ___ |
783 | } | 783 | } |
784 | |||
785 | if ($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 | |||
784 | print "#include \"x86_arch.h\"\n"; | 800 | print "#include \"x86_arch.h\"\n"; |
785 | 801 | ||
786 | while($line=<>) { | 802 | while($line=<>) { |