From 575795113210c25dd50e3dc9e9f5f859f689e2a9 Mon Sep 17 00:00:00 2001 From: jsing Date: Wed, 26 Jul 2023 09:57:34 +0000 Subject: [PATCH] Remove constructor attribute for OPENSSL_cpuid_setup() on arm/aarch64. OPENSSL_cpuid_setup() is invoked via OPENSSL_init_crypto(), whihc is triggered by various entry points to the library. As such, we do not need to invoke it as a constructor. ok tb@ --- lib/libcrypto/arch/aarch64/arm64cap.c | 6 +----- lib/libcrypto/arch/arm/armcap.c | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/libcrypto/arch/aarch64/arm64cap.c b/lib/libcrypto/arch/aarch64/arm64cap.c index 9d75daba0ba..23ff8b8dd48 100644 --- a/lib/libcrypto/arch/aarch64/arm64cap.c +++ b/lib/libcrypto/arch/aarch64/arm64cap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arm64cap.c,v 1.2 2022/03/25 17:42:07 robert Exp $ */ +/* $OpenBSD: arm64cap.c,v 1.3 2023/07/26 09:57:34 jsing Exp $ */ #include #include #include @@ -30,10 +30,6 @@ unsigned int OPENSSL_armcap_P; -#if defined(__GNUC__) && __GNUC__ >= 2 -void OPENSSL_cpuid_setup(void) __attribute__((constructor)); -#endif - #if defined(CPU_ID_AA64ISAR0) void OPENSSL_cpuid_setup(void) diff --git a/lib/libcrypto/arch/arm/armcap.c b/lib/libcrypto/arch/arm/armcap.c index e1a721b71fc..9d93d11eee9 100644 --- a/lib/libcrypto/arch/arm/armcap.c +++ b/lib/libcrypto/arch/arm/armcap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armcap.c,v 1.1 2022/03/23 15:13:31 tb Exp $ */ +/* $OpenBSD: armcap.c,v 1.2 2023/07/26 09:57:34 jsing Exp $ */ #include #include #include @@ -28,10 +28,6 @@ void _armv8_sha256_probe(void); void _armv8_pmull_probe(void); #endif -#if defined(__GNUC__) && __GNUC__>=2 -void OPENSSL_cpuid_setup(void) __attribute__((constructor)); -#endif - void OPENSSL_cpuid_setup(void) { -- 2.20.1