diff options
author | jsing <> | 2023-07-26 09:57:34 +0000 |
---|---|---|
committer | jsing <> | 2023-07-26 09:57:34 +0000 |
commit | df2992cf4d9c142739cbf358748187592c1679de (patch) | |
tree | d99dd07f89ddbefbe61772f035250e32d6d633b2 | |
parent | 602988a157776fbc867bdc728f0d59c9d4711e76 (diff) | |
download | openbsd-df2992cf4d9c142739cbf358748187592c1679de.tar.gz openbsd-df2992cf4d9c142739cbf358748187592c1679de.tar.bz2 openbsd-df2992cf4d9c142739cbf358748187592c1679de.zip |
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@
-rw-r--r-- | src/lib/libcrypto/arch/aarch64/arm64cap.c | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/arch/arm/armcap.c | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/lib/libcrypto/arch/aarch64/arm64cap.c b/src/lib/libcrypto/arch/aarch64/arm64cap.c index 9d75daba0b..23ff8b8dd4 100644 --- a/src/lib/libcrypto/arch/aarch64/arm64cap.c +++ b/src/lib/libcrypto/arch/aarch64/arm64cap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: arm64cap.c,v 1.2 2022/03/25 17:42:07 robert Exp $ */ | 1 | /* $OpenBSD: arm64cap.c,v 1.3 2023/07/26 09:57:34 jsing Exp $ */ |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <string.h> | 4 | #include <string.h> |
@@ -30,10 +30,6 @@ | |||
30 | 30 | ||
31 | unsigned int OPENSSL_armcap_P; | 31 | unsigned int OPENSSL_armcap_P; |
32 | 32 | ||
33 | #if defined(__GNUC__) && __GNUC__ >= 2 | ||
34 | void OPENSSL_cpuid_setup(void) __attribute__((constructor)); | ||
35 | #endif | ||
36 | |||
37 | #if defined(CPU_ID_AA64ISAR0) | 33 | #if defined(CPU_ID_AA64ISAR0) |
38 | void | 34 | void |
39 | OPENSSL_cpuid_setup(void) | 35 | OPENSSL_cpuid_setup(void) |
diff --git a/src/lib/libcrypto/arch/arm/armcap.c b/src/lib/libcrypto/arch/arm/armcap.c index e1a721b71f..9d93d11eee 100644 --- a/src/lib/libcrypto/arch/arm/armcap.c +++ b/src/lib/libcrypto/arch/arm/armcap.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: armcap.c,v 1.1 2022/03/23 15:13:31 tb Exp $ */ | 1 | /* $OpenBSD: armcap.c,v 1.2 2023/07/26 09:57:34 jsing Exp $ */ |
2 | #include <stdio.h> | 2 | #include <stdio.h> |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <string.h> | 4 | #include <string.h> |
@@ -28,10 +28,6 @@ void _armv8_sha256_probe(void); | |||
28 | void _armv8_pmull_probe(void); | 28 | void _armv8_pmull_probe(void); |
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | #if defined(__GNUC__) && __GNUC__>=2 | ||
32 | void OPENSSL_cpuid_setup(void) __attribute__((constructor)); | ||
33 | #endif | ||
34 | |||
35 | void | 31 | void |
36 | OPENSSL_cpuid_setup(void) | 32 | OPENSSL_cpuid_setup(void) |
37 | { | 33 | { |