summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-08-21 05:31:02 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-08-21 05:31:19 -0700
commit1dbbb1ec7af9026bbdc6dd265525de0c3958406c (patch)
tree21aa5ee4232f9e0c8a0f45f7b8476711fce828e7 /sysdeps/posix
parent2585d7b839559e665d5723734862fbe62264b25d (diff)
downloadglibc-1dbbb1ec7af9026bbdc6dd265525de0c3958406c.tar.gz
glibc-1dbbb1ec7af9026bbdc6dd265525de0c3958406c.tar.xz
glibc-1dbbb1ec7af9026bbdc6dd265525de0c3958406c.zip
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.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/getaddrinfo.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index f02bbbe533..fcc5d79362 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -318,7 +318,6 @@ typedef enum nss_status (*nss_gethostbyname3_r)
 typedef enum nss_status (*nss_getcanonname_r)
   (const char *name, char *buffer, size_t buflen, char **result,
    int *errnop, int *h_errnop);
-extern service_user *__nss_hosts_database attribute_hidden;
 
 /* This function is called if a canonical name is requested, but if
    the service function did not provide it.  It tries to obtain the