Remove .init section that calls OPENSSL_cpuid_setup on amd64.
authorjsing <jsing@openbsd.org>
Thu, 28 Mar 2024 11:16:32 +0000 (11:16 +0000)
committerjsing <jsing@openbsd.org>
Thu, 28 Mar 2024 11:16:32 +0000 (11:16 +0000)
OPENSSL_cpuid_setup() is already called from OPENSSL_crypto_init(), hence
we do not need or want automatic initialisation on library load.

ok tb@

lib/libcrypto/x86_64cpuid.pl

index 5e85c40..a735a97 100644 (file)
@@ -15,17 +15,7 @@ open OUT,"| \"$^X\" $xlate $flavour $output";
 ($arg1,$arg2,$arg3,$arg4)=("%rdi","%rsi","%rdx","%rcx");       # Unix order
 
 print<<___;
-.extern                OPENSSL_cpuid_setup
-.hidden                OPENSSL_cpuid_setup
-.section       .init
-       _CET_ENDBR
-       call    OPENSSL_cpuid_setup
-
-.extern        OPENSSL_ia32cap_P
-.hidden        OPENSSL_ia32cap_P
-
 .text
-
 .globl OPENSSL_ia32_cpuid
 .type  OPENSSL_ia32_cpuid,\@abi-omnipotent
 .align 16