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.17-475-gdc0a026


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  dc0a02638583d8e7f7e1cc72643d1b26ec6042fd (commit)
       via  3d3436ae68a907f656a07604eb7e10a50e1c8f85 (commit)
      from  af15c191766fd413ef6fedc9d54b87962332ca71 (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=dc0a02638583d8e7f7e1cc72643d1b26ec6042fd

commit dc0a02638583d8e7f7e1cc72643d1b26ec6042fd
Author: Roland McGrath <roland@hack.frob.com>
Date:   Thu Mar 28 15:39:32 2013 -0700

    Make _dl_phdr pointer to const.

diff --git a/ChangeLog b/ChangeLog
index 2689884..de20ebb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-03-28  Roland McGrath  <roland@hack.frob.com>
 
+	* elf/dl-support.c (_dl_phdr): Make pointer to const.
+	(_dl_aux_init): Use const in cast when setting it.
+	* sysdeps/mach/hurd/i386/init-first.c (init1): Remove superfluous cast.
+	* sysdeps/generic/ldsodefs.h [!SHARED] (_dl_phdr): Update decl.
+	* csu/libc-tls.c (__libc_setup_tls): Make PHDR pointer to const.
+
 	* sysdeps/generic/ldsodefs.h [!SHARED] (_dl_phdr, _dl_phnum):
 	Declare them here.
 	* elf/dl-iteratephdr.c [!SHARED] (_dl_phdr, _dl_phnum): Not here.
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index 2a19501..c37df67 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -114,7 +114,7 @@ __libc_setup_tls (size_t tcbsize, size_t tcbalign)
   size_t align = 0;
   size_t max_align = tcbalign;
   size_t tcb_offset;
-  ElfW(Phdr) *phdr;
+  const ElfW(Phdr) *phdr;
 
   /* Look through the TLS segment if there is any.  */
   if (_dl_phdr != NULL)
diff --git a/elf/dl-support.c b/elf/dl-support.c
index ad9b4c4..7a55b82 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -126,7 +126,7 @@ int _dl_debug_fd = STDERR_FILENO;
 int _dl_correct_cache_id = _DL_CACHE_DEFAULT_ID;
 
 ElfW(auxv_t) *_dl_auxv;
-ElfW(Phdr) *_dl_phdr;
+const ElfW(Phdr) *_dl_phdr;
 size_t _dl_phnum;
 uint64_t _dl_hwcap __attribute__ ((nocommon));
 
@@ -205,7 +205,7 @@ _dl_aux_init (ElfW(auxv_t) *av)
 	GLRO(dl_clktck) = av->a_un.a_val;
 	break;
       case AT_PHDR:
-	GL(dl_phdr) = (void *) av->a_un.a_val;
+	GL(dl_phdr) = (const void *) av->a_un.a_val;
 	break;
       case AT_PHNUM:
 	GL(dl_phnum) = av->a_un.a_val;
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 89db552..41684f3 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -603,7 +603,7 @@ extern const struct rtld_global_ro _rtld_global_ro
 
 #ifndef SHARED
 /* dl-support.c defines these and initializes them early on.  */
-extern ElfW(Phdr) *_dl_phdr;
+extern const ElfW(Phdr) *_dl_phdr;
 extern size_t _dl_phnum;
 #endif
 
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index 3cfddce..59253db 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -122,7 +122,7 @@ init1 (int argc, char *arg0, ...)
 	 the exec server.  */
       extern const void _start;
       const ElfW(Ehdr) *const ehdr = &_start;
-      _dl_phdr = (ElfW(Phdr) *) ((const void *) ehdr + ehdr->e_phoff);
+      _dl_phdr = (const void *) ehdr + ehdr->e_phoff;
       _dl_phnum = ehdr->e_phnum;
       assert (ehdr->e_phentsize == sizeof (ElfW(Phdr)));
 #endif

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

commit 3d3436ae68a907f656a07604eb7e10a50e1c8f85
Author: Roland McGrath <roland@hack.frob.com>
Date:   Thu Mar 28 15:33:57 2013 -0700

    Consolidate declarations of _dl_phdr, _dl_phnum.

diff --git a/ChangeLog b/ChangeLog
index f21bf51..2689884 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2013-03-28  Roland McGrath  <roland@hack.frob.com>
 
+	* sysdeps/generic/ldsodefs.h [!SHARED] (_dl_phdr, _dl_phnum):
+	Declare them here.
+	* elf/dl-iteratephdr.c [!SHARED] (_dl_phdr, _dl_phnum): Not here.
+	* csu/libc-tls.c: Nor here.
+	* sysdeps/mach/hurd/i386/init-first.c (init1): Nor here.
+
 	* sysdeps/posix/libc_fatal.c: Don't include <sys/syslog.h>.
 	(__libc_message): Never call vsyslog.
 
diff --git a/csu/libc-tls.c b/csu/libc-tls.c
index 5fa39eb..2a19501 100644
--- a/csu/libc-tls.c
+++ b/csu/libc-tls.c
@@ -28,10 +28,6 @@
  #error makefile bug, this file is for static only
 #endif
 
-extern ElfW(Phdr) *_dl_phdr;
-extern size_t _dl_phnum;
-
-
 dtv_t _dl_static_dtv[2 + TLS_SLOTINFO_SURPLUS];
 
 
diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c
index 13d815c..609b900 100644
--- a/elf/dl-iteratephdr.c
+++ b/elf/dl-iteratephdr.c
@@ -92,10 +92,6 @@ weak_alias (__dl_iterate_phdr, dl_iterate_phdr);
 
 #else
 
-/* dl-support.c defines these and initializes them early on.  */
-extern ElfW(Phdr) *_dl_phdr;
-extern size_t _dl_phnum;
-
 int
 dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
 				  size_t size, void *data), void *data)
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 9944555..89db552 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -601,6 +601,12 @@ extern const struct rtld_global_ro _rtld_global_ro
 #endif
 #undef EXTERN
 
+#ifndef SHARED
+/* dl-support.c defines these and initializes them early on.  */
+extern ElfW(Phdr) *_dl_phdr;
+extern size_t _dl_phnum;
+#endif
+
 #ifdef IS_IN_rtld
 /* This is the initial value of GL(dl_error_catch_tsd).
    A non-TLS libpthread will change it.  */
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index c51737b..3cfddce 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -106,10 +106,6 @@ init1 (int argc, char *arg0, ...)
   char **argv = &arg0;
   char **envp = &argv[argc + 1];
   struct hurd_startup_data *d;
-#ifndef SHARED
-  extern ElfW(Phdr) *_dl_phdr;
-  extern size_t _dl_phnum;
-#endif
 
   while (*envp)
     ++envp;

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

Summary of changes:
 ChangeLog                           |   12 ++++++++++++
 csu/libc-tls.c                      |    6 +-----
 elf/dl-iteratephdr.c                |    4 ----
 elf/dl-support.c                    |    4 ++--
 sysdeps/generic/ldsodefs.h          |    6 ++++++
 sysdeps/mach/hurd/i386/init-first.c |    6 +-----
 6 files changed, 22 insertions(+), 16 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]