aboutsummaryrefslogtreecommitdiff
path: root/include/libc-symbols.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-04 17:18:23 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-04 17:18:42 -0700
commitee417882e07277b2a36e7e61e6ef7edd96415b3f (patch)
treebdd0f60f81b8a631c63275ea083308ad4127f404 /include/libc-symbols.h
parenta67029ff12319300458a502be1d12aa2065c48da (diff)
downloadglibc-ee417882e07277b2a36e7e61e6ef7edd96415b3f.zip
glibc-ee417882e07277b2a36e7e61e6ef7edd96415b3f.tar.gz
glibc-ee417882e07277b2a36e7e61e6ef7edd96415b3f.tar.bz2
Don't use hidden visibility in libc.a with PIE on i386
On i386, when multi-arch is enabled, all external functions must be called via PIC PLT in PIE, which requires setting up EBX register, since they may be IFUNC functions. * config.h.in (NO_HIDDEN_EXTERN_FUNC_IN_PIE): New. * include/libc-symbols.h (__hidden_proto_hiddenattr): Add check for PIC and NO_HIDDEN_EXTERN_FUNC_IN_PIE. * sysdeps/i386/configure.ac (NO_HIDDEN_EXTERN_FUNC_IN_PIE): New AC_DEFINE if multi-arch is enabled. * sysdeps/i386/configure: Regenerated.
Diffstat (limited to 'include/libc-symbols.h')
-rw-r--r--include/libc-symbols.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h
index e0d4dc3..8726262 100644
--- a/include/libc-symbols.h
+++ b/include/libc-symbols.h
@@ -507,6 +507,7 @@ for linking")
#else
# ifndef __ASSEMBLER__
# if !defined SHARED && IS_IN (libc) && !defined LIBC_NONSHARED \
+ && (!defined PIC || !defined NO_HIDDEN_EXTERN_FUNC_IN_PIE) \
&& !defined NO_HIDDEN
# define __hidden_proto_hiddenattr(attrs...) \
__attribute__ ((visibility ("hidden"), ##attrs))