From: miod Date: Thu, 11 Jul 2024 21:31:52 +0000 (+0000) Subject: Despite being an ELF citizen, hppa is its own special snowflake and requires X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d366a8dc5729ba8946201d04b01ee53f07a79f91;p=openbsd 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. --- diff --git a/lib/libcrypto/hidden/crypto_namespace.h b/lib/libcrypto/hidden/crypto_namespace.h index 3aec62f1f14..741ad085496 100644 --- a/lib/libcrypto/hidden/crypto_namespace.h +++ b/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))