diff options
author | miod <> | 2024-07-11 21:31:52 +0000 |
---|---|---|
committer | miod <> | 2024-07-11 21:31:52 +0000 |
commit | fa93323d36367ed7af0931f3b8c0181fe8dce26e (patch) | |
tree | 26ac528a2b68f6b89dde6a33bc7099e451f2c96a /src | |
parent | ddf5531a62ecff7872cb85dd71281c9bc93364e6 (diff) | |
download | openbsd-fa93323d36367ed7af0931f3b8c0181fe8dce26e.tar.gz openbsd-fa93323d36367ed7af0931f3b8c0181fe8dce26e.tar.bz2 openbsd-fa93323d36367ed7af0931f3b8c0181fe8dce26e.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.h | 6 |
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)) |