diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/libc-symbols.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index d25a8fd56c..e7ffb591b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2017-08-21 H.J. Lu <hongjiu.lu@intel.com> + * include/libc-symbols.h (attribute_hidden): Enable hidden + visibility in libc.a compiled with PIE. + +2017-08-21 H.J. Lu <hongjiu.lu@intel.com> + [BZ #18822] * sysdeps/unix/sysv/linux/x86/libc-vdso.h (VDSO_SYMBOL(getcpu)): Add attribute_hidden. diff --git a/include/libc-symbols.h b/include/libc-symbols.h index fe3ab81c51..d6a1c260f6 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -363,7 +363,8 @@ for linking") strong_alias(real, name) #endif -#if defined SHARED || defined LIBC_NONSHARED +#if defined SHARED || defined LIBC_NONSHARED \ + || (BUILD_PIE_DEFAULT && IS_IN (libc)) # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_hidden |