diff options
author | Juergen Christ <jchrist@linux.ibm.com> | 2022-03-23 13:26:13 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-03-25 14:19:27 +0100 |
commit | 3299313d05f278dbea326ecbb461506a9a212690 (patch) | |
tree | 0174a653022f97e56624b5fc37867b42e7c9186b /crypto/s390xcap.c | |
parent | 940d35182f486e432072051419553ca4ada669aa (diff) | |
download | openssl-3299313d05f278dbea326ecbb461506a9a212690.zip openssl-3299313d05f278dbea326ecbb461506a9a212690.tar.gz openssl-3299313d05f278dbea326ecbb461506a9a212690.tar.bz2 |
s390x: Hide internal cpuid symbol and function
The symbol OPENSSL_s390xcap_P and the OPENSSL_cpuid_setup function are not
exported by the version script of OpenSSL. However, if someone uses the
static library without the version script, these symbols all of a sudden
become global symbols and their usage in assembler code does not correctly
reflect that for PIC. Since these symbols should never be used outside of
OpenSSL, hide them inside the binary.
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17946)
(cherry picked from commit 37816ef5757e458be9648481e56bf698ee3bfbb1)
Diffstat (limited to 'crypto/s390xcap.c')
-rw-r--r-- | crypto/s390xcap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/s390xcap.c b/crypto/s390xcap.c index f8e0234..d433df9 100644 --- a/crypto/s390xcap.c +++ b/crypto/s390xcap.c @@ -74,6 +74,9 @@ void OPENSSL_s390x_functions(void); struct OPENSSL_s390xcap_st OPENSSL_s390xcap_P; +#if defined(__GNUC__) && defined(__linux) +__attribute__ ((visibility("hidden"))) +#endif void OPENSSL_cpuid_setup(void) { struct OPENSSL_s390xcap_st cap; |