summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-01 14:34:18 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-01 14:34:54 -0700
commit8ed3b64330cd24e2a17d8794a871cab034707a33 (patch)
treec0866d5ce8606469bddba2cf06a430c9c4145aaa /misc
parentef9b6f73f45a46d079018f63e2d9184eaa0db1d5 (diff)
downloadglibc-8ed3b64330cd24e2a17d8794a871cab034707a33.tar.gz
Mark internal stdlib functions with attribute_hidden [BZ #18822]
Mark internal stdlib functions with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. __realpath is hidden with libc_hidden_proto and libc_hidden_def since the exported realpath is an alias of __realpath. [BZ #18822] * include/stdlib.h (__random): Add attribute_hidden. (__random_r): Likewise. (__srandom_r): Likewise. (__initstate_r): Likewise. (__setstate_r): Likewise. (__erand48_r): Likewise. (__nrand48_r): Likewise. (__jrand48_r): Likewise. (__srand48_r): Likewise. (__seed48_r): Likewise. (__lcong48_r): Likewise. (__drand48_iterate): Likewise. (__setenv): Likewise. (__unsetenv): Likewise. (__clearenv): Likewise. (__ptsname_r): Likewise. (__posix_openpt): Likewise. (__add_to_environ): Likewise. (__realpath): Add libc_hidden_proto. (__ecvt_r): Likewise. (__fcvt_r): Likewise. (__qecvt_r): Likewise. (__qfcvt_r): Likewise. * misc/efgcvt_r.c (cvt_symbol_1): Add libc_hidden_def (local). * stdlib/canonicalize.c (__realpath): Add libc_hidden_def.
Diffstat (limited to 'misc')
-rw-r--r--misc/efgcvt_r.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c
index e34c455f0a..7bd3d16c00 100644
--- a/misc/efgcvt_r.c
+++ b/misc/efgcvt_r.c
@@ -240,6 +240,7 @@ __APPEND (FUNC_PREFIX, ecvt_r) (FLOAT_TYPE value, int ndigit, int *decpt,
cvt_symbol_1 (libc, __APPEND (FUNC_PREFIX, symbol), \
APPEND (FUNC_PREFIX, symbol), GLIBC_2_4)
# define cvt_symbol_1(lib, local, symbol, version) \
+ libc_hidden_def (local) \
versioned_symbol (lib, local, symbol, version)
# else
# define cvt_symbol(symbol) \
@@ -247,11 +248,15 @@ __APPEND (FUNC_PREFIX, ecvt_r) (FLOAT_TYPE value, int ndigit, int *decpt,
APPEND (q, symbol), GLIBC_2_0); \
weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
# define cvt_symbol_1(lib, local, symbol, version) \
+ libc_hidden_def (local) \
compat_symbol (lib, local, symbol, version)
# endif
#else
# define cvt_symbol(symbol) \
- weak_alias (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+ cvt_symbol_1 (__APPEND (FUNC_PREFIX, symbol), APPEND (FUNC_PREFIX, symbol))
+# define cvt_symbol_1(local, symbol) \
+ libc_hidden_def (local) \
+ weak_alias (local, symbol)
#endif
cvt_symbol(fcvt_r);
cvt_symbol(ecvt_r);