This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26-143-g54e4b8f


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  54e4b8f21590d57ec9a2f2ad81a17c57e3b3984f (commit)
       via  1dbbb1ec7af9026bbdc6dd265525de0c3958406c (commit)
      from  2585d7b839559e665d5723734862fbe62264b25d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=54e4b8f21590d57ec9a2f2ad81a17c57e3b3984f

commit 54e4b8f21590d57ec9a2f2ad81a17c57e3b3984f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Aug 21 05:32:21 2017 -0700

    Mark __libc_multiple_libcs with attribute_hidden [BZ #18822]
    
    Since __libc_multiple_libcs is defined as hidden symbol in init-first.c,
    it should be always marked with attribute_hidden.
    
    	[BZ #18822]
    	* csu/libc-start.c (__libc_multiple_libcs): Removed.
    	* elf/dl-open.c: Include <libc-internal.h>.
    	(__libc_multiple_libcs): Removed.
    	* elf/dl-sysdep.c: Include <libc-internal.h> instead of
    	<hp-timing.h>.
    	* include/libc-internal.h (__libc_multiple_libcs): New.
    	* misc/sbrk.c: Include <libc-internal.h>.
    	(__libc_multiple_libcs): Removed.

diff --git a/ChangeLog b/ChangeLog
index 680f377..4f34d4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,18 @@
 2017-08-21  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #18822]
+	* csu/libc-start.c (__libc_multiple_libcs): Removed.
+	* elf/dl-open.c: Include <libc-internal.h>.
+	(__libc_multiple_libcs): Removed.
+	* elf/dl-sysdep.c: Include <libc-internal.h> instead of
+	<hp-timing.h>.
+	* include/libc-internal.h (__libc_multiple_libcs): New.
+	* misc/sbrk.c: Include <libc-internal.h>.
+	(__libc_multiple_libcs): Removed.
+
+2017-08-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #18822]
 	* grp/initgroups.c (__nss_group_database): Removed.
 	(__nss_initgroups_database): Likewise.
 	* nscd/gai.c (__nss_hosts_database): Likewise.
diff --git a/csu/libc-start.c b/csu/libc-start.c
index 6720617..24c63be 100644
--- a/csu/libc-start.c
+++ b/csu/libc-start.c
@@ -27,8 +27,6 @@
 
 extern void __libc_init_first (int argc, char **argv, char **envp);
 
-extern int __libc_multiple_libcs;
-
 #include <tls.h>
 #ifndef SHARED
 # include <dl-osinfo.h>
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 2d8948a..c539f10 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -33,12 +33,11 @@
 #include <tls.h>
 #include <stap-probe.h>
 #include <atomic.h>
+#include <libc-internal.h>
 
 #include <dl-dst.h>
 
 
-extern int __libc_multiple_libcs;	/* Defined in init-first.c.  */
-
 /* We must be careful not to leave us in an inconsistent state.  Thus we
    catch any error and re-raise it after cleaning up.  */
 
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index 4053ff3..c4ff8b2 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -41,7 +41,7 @@
 #include <dl-machine.h>
 #include <dl-procinfo.h>
 #include <dl-osinfo.h>
-#include <hp-timing.h>
+#include <libc-internal.h>
 #include <tls.h>
 
 #include <dl-tunables.h>
diff --git a/include/libc-internal.h b/include/libc-internal.h
index cd2f262..c501c95 100644
--- a/include/libc-internal.h
+++ b/include/libc-internal.h
@@ -53,4 +53,6 @@ extern void __init_misc (int, char **, char **);
 extern __typeof (__profile_frequency) __profile_frequency attribute_hidden;
 # endif
 
+extern int __libc_multiple_libcs attribute_hidden;
+
 #endif /* _LIBC_INTERNAL  */
diff --git a/misc/sbrk.c b/misc/sbrk.c
index 965c0ef..158399d 100644
--- a/misc/sbrk.c
+++ b/misc/sbrk.c
@@ -18,14 +18,12 @@
 #include <errno.h>
 #include <stdint.h>
 #include <unistd.h>
+#include <libc-internal.h>
 
 /* Defined in brk.c.  */
 extern void *__curbrk;
 extern int __brk (void *addr);
 
-/* Defined in init-first.c.  */
-extern int __libc_multiple_libcs attribute_hidden;
-
 /* Extend the process's data space by INCREMENT.
    If INCREMENT is negative, shrink data space by - INCREMENT.
    Return start of new space allocated, or -1 for errors.  */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1dbbb1ec7af9026bbdc6dd265525de0c3958406c

commit 1dbbb1ec7af9026bbdc6dd265525de0c3958406c
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Aug 21 05:31:02 2017 -0700

    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.

diff --git a/ChangeLog b/ChangeLog
index 170d3ac..680f377 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2017-08-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[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.
+
 2017-08-20  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #18822]
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;
 
 
diff --git a/nscd/gai.c b/nscd/gai.c
index a1aeada..084a1fe 100644
--- a/nscd/gai.c
+++ b/nscd/gai.c
@@ -43,6 +43,3 @@
 #ifdef HAVE_LIBIDN
 # include <libidn/idn-stub.c>
 #endif
-
-/* Some variables normally defined in libc.  */
-service_user *__nss_hosts_database;
diff --git a/nss/XXX-lookup.c b/nss/XXX-lookup.c
index 4941769..839c96e 100644
--- a/nss/XXX-lookup.c
+++ b/nss/XXX-lookup.c
@@ -52,8 +52,6 @@
 #define DEFAULT_CONFIG NULL
 #endif
 
-service_user *DATABASE_NAME_SYMBOL attribute_hidden;
-
 int
 DB_LOOKUP_FCT (service_user **ni, const char *fct_name, const char *fct2_name,
 	       void **fctp)
diff --git a/nss/getXXent.c b/nss/getXXent.c
index aad3741..31bd24b 100644
--- a/nss/getXXent.c
+++ b/nss/getXXent.c
@@ -56,7 +56,7 @@
 /* Prototype of the reentrant version.  */
 extern int INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer,
 					 size_t buflen, LOOKUP_TYPE **result
-					 H_ERRNO_PARM);
+					 H_ERRNO_PARM) attribute_hidden;
 
 /* We need to protect the dynamic buffer handling.  */
 __libc_lock_define_initialized (static, lock);
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 8f31658..834bef6 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -73,8 +73,10 @@ static const struct
 };
 #define ndatabases (sizeof (databases) / sizeof (databases[0]))
 
+#ifdef USE_NSCD
 /* Flags whether custom rules for database is set.  */
 bool __nss_database_custom[NSS_DBSIDX_max];
+#endif
 
 
 __libc_lock_define_initialized (static, lock)
@@ -304,7 +306,9 @@ __nss_configure_lookup (const char *dbname, const char *service_line)
 
   /* Install new rules.  */
   *databases[cnt].dbp = new_db;
+#ifdef USE_NSCD
   __nss_database_custom[cnt] = true;
+#endif
 
   __libc_lock_unlock (lock);
 
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index 2b86d63..ab0a512 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -96,17 +96,19 @@ typedef struct name_database
 } name_database;
 
 
+#ifdef USE_NSCD
 /* Indices into DATABASES in nsswitch.c and __NSS_DATABASE_CUSTOM.  */
 enum
   {
-#define DEFINE_DATABASE(arg) NSS_DBSIDX_##arg,
-#include "databases.def"
-#undef DEFINE_DATABASE
+# define DEFINE_DATABASE(arg) NSS_DBSIDX_##arg,
+# include "databases.def"
+# undef DEFINE_DATABASE
     NSS_DBSIDX_max
   };
 
 /* Flags whether custom rules for database is set.  */
-extern bool __nss_database_custom[NSS_DBSIDX_max];
+extern bool __nss_database_custom[NSS_DBSIDX_max] attribute_hidden;
+#endif
 
 /* Warning for NSS functions, which don't require dlopen if glibc
    was built with --enable-static-nss.  */
@@ -180,11 +182,13 @@ extern void __nss_setent (const char *func_name,
 			  db_lookup_function lookup_fct,
 			  service_user **nip, service_user **startp,
 			  service_user **last_nip, int stayon,
-			  int *stayon_tmp, int res);
+			  int *stayon_tmp, int res)
+     attribute_hidden;
 extern void __nss_endent (const char *func_name,
 			  db_lookup_function lookup_fct,
 			  service_user **nip, service_user **startp,
-			  service_user **last_nip, int res);
+			  service_user **last_nip, int res)
+     attribute_hidden;
 extern int __nss_getent_r (const char *getent_func_name,
 			   const char *setent_func_name,
 			   db_lookup_function lookup_fct,
@@ -192,10 +196,12 @@ extern int __nss_getent_r (const char *getent_func_name,
 			   service_user **last_nip, int *stayon_tmp,
 			   int res,
 			   void *resbuf, char *buffer, size_t buflen,
-			   void **result, int *h_errnop);
+			   void **result, int *h_errnop)
+     attribute_hidden;
 extern void *__nss_getent (getent_r_function func,
 			   void **resbuf, char **buffer, size_t buflen,
-			   size_t *buffer_size, int *h_errnop);
+			   size_t *buffer_size, int *h_errnop)
+     attribute_hidden;
 struct resolv_context;
 struct hostent;
 extern int __nss_hostname_digits_dots_context (struct resolv_context *,
@@ -221,6 +227,7 @@ libc_hidden_proto (__nss_hostname_digits_dots)
 
 /* Prototypes for __nss_*_lookup2 functions.  */
 #define DEFINE_DATABASE(arg)				    \
+  service_user *__nss_##arg##_database attribute_hidden;    \
   int __nss_##arg##_lookup2 (service_user **, const char *, \
 			     const char *, void **);	    \
   libc_hidden_proto (__nss_##arg##_lookup2)
diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
index ee92813..f509534 100644
--- a/posix/tst-rfc3484-2.c
+++ b/posix/tst-rfc3484-2.c
@@ -58,8 +58,6 @@ _res_hconf_init (void)
 #undef	USE_NSCD
 #include "../sysdeps/posix/getaddrinfo.c"
 
-service_user *__nss_hosts_database attribute_hidden;
-
 
 /* This is the beginning of the real test code.  The above defines
    (among other things) the function rfc3484_sort.  */
diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
index c987366..ae44087 100644
--- a/posix/tst-rfc3484-3.c
+++ b/posix/tst-rfc3484-3.c
@@ -58,8 +58,6 @@ _res_hconf_init (void)
 #undef	USE_NSCD
 #include "../sysdeps/posix/getaddrinfo.c"
 
-service_user *__nss_hosts_database attribute_hidden;
-
 
 /* This is the beginning of the real test code.  The above defines
    (among other things) the function rfc3484_sort.  */
diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
index 73c4dff..7f191ab 100644
--- a/posix/tst-rfc3484.c
+++ b/posix/tst-rfc3484.c
@@ -58,8 +58,6 @@ _res_hconf_init (void)
 #undef	USE_NSCD
 #include "../sysdeps/posix/getaddrinfo.c"
 
-service_user *__nss_hosts_database attribute_hidden;
-
 
 /* This is the beginning of the real test code.  The above defines
    (among other things) the function rfc3484_sort.  */
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index f02bbbe..fcc5d79 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

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |   37 +++++++++++++++++++++++++++++++++++++
 csu/libc-start.c            |    2 --
 elf/dl-open.c               |    3 +--
 elf/dl-sysdep.c             |    2 +-
 grp/initgroups.c            |    2 --
 include/libc-internal.h     |    2 ++
 misc/sbrk.c                 |    4 +---
 nscd/gai.c                  |    3 ---
 nss/XXX-lookup.c            |    2 --
 nss/getXXent.c              |    2 +-
 nss/nsswitch.c              |    4 ++++
 nss/nsswitch.h              |   23 +++++++++++++++--------
 posix/tst-rfc3484-2.c       |    2 --
 posix/tst-rfc3484-3.c       |    2 --
 posix/tst-rfc3484.c         |    2 --
 sysdeps/posix/getaddrinfo.c |    1 -
 16 files changed, 62 insertions(+), 31 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]