summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2024-07-12 05:26:35 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2024-07-12 05:26:35 +0000
commit89f23f06120751b07b4bf4d4807a041a112914ea (patch)
treeac7854754d8af1a89b1727a318d811be1e59ab20
parent91028d1aa5d31a60d98c798f9244a19fe8e34915 (diff)
Despite being an ELF citizen, hppa is its own special snowflake and requires
different asm stanzas to produce strong aliases. This unbreaks libssl on hppa after the recent switch to LIBRESSL_NAMESPACE.
-rw-r--r--lib/libssl/hidden/ssl_namespace.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libssl/hidden/ssl_namespace.h b/lib/libssl/hidden/ssl_namespace.h
index 7a941a0e109..5d26516f3c5 100644
--- a/lib/libssl/hidden/ssl_namespace.h
+++ b/lib/libssl/hidden/ssl_namespace.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_namespace.h,v 1.2 2023/02/16 08:38:17 tb Exp $ */
+/* $OpenBSD: ssl_namespace.h,v 1.3 2024/07/12 05:26:34 miod Exp $ */
/*
* Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
*
@@ -27,7 +27,11 @@
#define LSSL_UNUSED(x) typeof(x) x __attribute__((deprecated))
#define LSSL_USED(x) __attribute__((visibility("hidden"))) \
typeof(x) x asm("_lssl_"#x)
+#if defined(__hppa__)
+#define LSSL_ALIAS(x) asm("! .global "#x" ! .set "#x", _lssl_"#x)
+#else
#define LSSL_ALIAS(x) asm(".global "#x"; "#x" = _lssl_"#x)
+#endif
#else
#define LSSL_UNUSED(x)
#define LSSL_USED(x)