From 1dbbb1ec7af9026bbdc6dd265525de0c3958406c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 21 Aug 2017 05:31:02 -0700 Subject: Mark internal nss symbols with attribute_hidden [BZ #18822] Mark internal nss symbols with attribute_hidden to allow direct access within libc.so and libc.a without using GOT nor PLT. Tested on x86-64 with and without --disable-nscd. [BZ #18822] * grp/initgroups.c (__nss_group_database): Removed. (__nss_initgroups_database): Likewise. * nscd/gai.c (__nss_hosts_database): Likewise. * nss/XXX-lookup.c (DATABASE_NAME_SYMBOL): Likewise. * posix/tst-rfc3484-2.c (__nss_hosts_database): Likewise. * posix/tst-rfc3484-3.c (__nss_hosts_database): Likewise. * posix/tst-rfc3484.c (__nss_hosts_database): Likewise. * sysdeps/posix/getaddrinfo.c (__nss_hosts_database): Likewise. * nss/getXXent.c (INTERNAL (REENTRANT_GETNAME)): Add attribute_hidden. * nss/nsswitch.c (__nss_database_custom): Define only if USE_NSCD is defined. (__nss_configure_lookup): Use __nss_database_custom only if USE_NSCD is defined. * nss/nsswitch.h (__nss_database_custom): Declare only if USE_NSCD is defined. Add attribute_hidden. (__nss_setent): Add attribute_hidden. (__nss_endent): Likewise. (__nss_getent_r): Likewise. (__nss_getent): Likewise. (DEFINE_DATABASE): Declare __nss_##arg##_database. --- grp/initgroups.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'grp') diff --git a/grp/initgroups.c b/grp/initgroups.c index 0d5b841..3e4a3de 100644 --- a/grp/initgroups.c +++ b/grp/initgroups.c @@ -36,8 +36,6 @@ typedef enum nss_status (*initgroups_dyn_function) (const char *, gid_t, long int *, long int *, gid_t **, long int, int *); -extern service_user *__nss_group_database attribute_hidden; -service_user *__nss_initgroups_database; static bool use_initgroups_entry; -- cgit v1.1