summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormiod <>2024-07-11 21:31:52 +0000
committermiod <>2024-07-11 21:31:52 +0000
commitf9501bbcb65d129765be548f112605a530961121 (patch)
tree26ac528a2b68f6b89dde6a33bc7099e451f2c96a /src
parentaeb0ba6683468b4ec77a76f5ea223a1af6d8158a (diff)
downloadopenbsd-f9501bbcb65d129765be548f112605a530961121.tar.gz
openbsd-f9501bbcb65d129765be548f112605a530961121.tar.bz2
openbsd-f9501bbcb65d129765be548f112605a530961121.zip
Despite being an ELF citizen, hppa is its own special snowflake and requires
different asm stanzas to produce strong aliases. This unbreaks libcrypto (and thus ssh, among other things) on hppa after the recent switch to LIBRESSL_CRYPTO_NAMESPACE.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/hidden/crypto_namespace.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/hidden/crypto_namespace.h b/src/lib/libcrypto/hidden/crypto_namespace.h
index 3aec62f1f1..741ad08549 100644
--- a/src/lib/libcrypto/hidden/crypto_namespace.h
+++ b/src/lib/libcrypto/hidden/crypto_namespace.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto_namespace.h,v 1.3 2024/03/30 10:09:43 tb Exp $ */ 1/* $OpenBSD: crypto_namespace.h,v 1.4 2024/07/11 21:31:52 miod Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org> 3 * Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
4 * 4 *
@@ -31,7 +31,11 @@
31 typeof(x) x asm("_lcry_"#x) 31 typeof(x) x asm("_lcry_"#x)
32# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \ 32# define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \
33 typeof(x) x asm("_lcry_"#x) 33 typeof(x) x asm("_lcry_"#x)
34# if defined(__hppa__)
35# define LCRYPTO_ALIAS1(pre,x) asm("! .global "#pre#x" ! .set "#pre#x", _lcry_"#x)
36#else
34# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x) 37# define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x)
38#endif
35# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x) 39# define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x)
36#else 40#else
37# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated)) 41# define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated))