From fa93323d36367ed7af0931f3b8c0181fe8dce26e Mon Sep 17 00:00:00 2001 From: miod <> Date: Thu, 11 Jul 2024 21:31:52 +0000 Subject: 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. --- src/lib/libcrypto/hidden/crypto_namespace.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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 @@ -/* $OpenBSD: crypto_namespace.h,v 1.3 2024/03/30 10:09:43 tb Exp $ */ +/* $OpenBSD: crypto_namespace.h,v 1.4 2024/07/11 21:31:52 miod Exp $ */ /* * Copyright (c) 2016 Philip Guenther * @@ -31,7 +31,11 @@ typeof(x) x asm("_lcry_"#x) # define LCRYPTO_USED(x) __attribute__((visibility("hidden"))) \ typeof(x) x asm("_lcry_"#x) +# if defined(__hppa__) +# define LCRYPTO_ALIAS1(pre,x) asm("! .global "#pre#x" ! .set "#pre#x", _lcry_"#x) +#else # define LCRYPTO_ALIAS1(pre,x) asm(".global "#pre#x"; "#pre#x" = _lcry_"#x) +#endif # define LCRYPTO_ALIAS(x) LCRYPTO_ALIAS1(,x); LCRYPTO_ALIAS1(_libre_,x) #else # define LCRYPTO_UNUSED(x) typeof(x) x __attribute__((deprecated)) -- cgit v1.2.3-55-g6feb