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 gentoo/2.18 updated. glibc-2.18-16-gd1b29e5


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, gentoo/2.18 has been updated
       via  d1b29e58c17436b3e0cf92c12b1e99ec6b4cd9ba (commit)
       via  b15ad643798707d247598a765edfa0ac0e8088c5 (commit)
       via  d8827b41e4a39c352bd8478671398b63a76dc03a (commit)
       via  f73b1129ae3e1f1f2a36b58442c5b35a6ce40827 (commit)
      from  55ca5af0414f921d5bfc9ca95befc902653ae03b (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=d1b29e58c17436b3e0cf92c12b1e99ec6b4cd9ba

commit d1b29e58c17436b3e0cf92c12b1e99ec6b4cd9ba
Author: Guy Martin <gmsoft@tuxicoman.be>
Date:   Thu Nov 21 13:23:16 2013 -0500

    Don't use broken DL_AUTO_FUNCTION_ADDRESS()
    
    On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the
    variable fptr[2] in it's own scope.
    
    The content of fptr[] is thus undefined right after the macro exits.
    Newer gcc's (>= 4.7) reuse the stack space of this variable triggering
    a segmentation fault in dl-init.c:69.
    
    To fix this we rewrite the macros to make the call directly to init
    and fini without needing to pass back a constructed function pointer.
    
    URL: https://bugs.gentoo.org/486618
    URL: https://bugs.gentoo.org/486974
    
    (cherry picked from commit daf75146de07303ea0c5ad700ec5ef703ec114a1)

diff --git a/elf/dl-close.c b/elf/dl-close.c
index fe3014c..407926b 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -274,9 +274,8 @@ _dl_close_worker (struct link_map *map)
 
 	      /* Next try the old-style destructor.  */
 	      if (imap->l_info[DT_FINI] != NULL)
-		(*(void (*) (void)) DL_DT_FINI_ADDRESS
-		 (imap, ((void *) imap->l_addr
-			 + imap->l_info[DT_FINI]->d_un.d_ptr))) ();
+		DL_CALL_DT_FINI (imap, ((void *) imap->l_addr
+			 + imap->l_info[DT_FINI]->d_un.d_ptr));
 	    }
 
 #ifdef SHARED
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index 6b245f0..db5269c 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -254,7 +254,7 @@ _dl_fini (void)
 
 		  /* Next try the old-style destructor.  */
 		  if (l->l_info[DT_FINI] != NULL)
-		    ((fini_t) DL_DT_FINI_ADDRESS (l, l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr)) ();
+		     DL_CALL_DT_FINI(l, l->l_addr + l->l_info[DT_FINI]->d_un.d_ptr);
 		}
 
 #ifdef SHARED
diff --git a/elf/dl-init.c b/elf/dl-init.c
index a657eb6..4078368 100644
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -61,13 +61,7 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
      - the others in the DT_INIT_ARRAY.
   */
   if (l->l_info[DT_INIT] != NULL)
-    {
-      init_t init = (init_t) DL_DT_INIT_ADDRESS
-	(l, l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr);
-
-      /* Call the function.  */
-      init (argc, argv, env);
-    }
+    DL_CALL_DT_INIT(l, l->l_addr + l->l_info[DT_INIT]->d_un.d_ptr, argc, argv, env);
 
   /* Next see whether there is an array with initialization functions.  */
   ElfW(Dyn) *init_array = l->l_info[DT_INIT_ARRAY];
diff --git a/ports/sysdeps/hppa/dl-lookupcfg.h b/ports/sysdeps/hppa/dl-lookupcfg.h
index 5c84c43..feea320 100644
--- a/ports/sysdeps/hppa/dl-lookupcfg.h
+++ b/ports/sysdeps/hppa/dl-lookupcfg.h
@@ -38,32 +38,36 @@ void _dl_unmap (struct link_map *map);
 
 #define DL_UNMAP(map) _dl_unmap (map)
 
-#define DL_AUTO_FUNCTION_ADDRESS(map, addr)				\
-({									\
-  unsigned int fptr[2];							\
-  fptr[0] = (unsigned int) (addr);					\
-  fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;			\
-  /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */	\
-  (ElfW(Addr))((unsigned int)fptr | 2);					\
-})
-
-#define DL_STATIC_FUNCTION_ADDRESS(map, addr)				\
-({									\
-  static unsigned int fptr[2];						\
-  fptr[0] = (unsigned int) (addr);					\
-  fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;			\
-  /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */	\
-  (ElfW(Addr))((unsigned int)fptr | 2);					\
-})
-
-
-/* The test for "addr & 2" below is to accomodate old binaries which
-   violated the ELF ABI by pointing DT_INIT and DT_FINI at a function
-   descriptor.  */
-#define DL_DT_INIT_ADDRESS(map, addr) \
-  ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
-#define DL_DT_FINI_ADDRESS(map, addr) \
-  ((Elf32_Addr)(addr) & 2 ? (addr) : DL_AUTO_FUNCTION_ADDRESS (map, addr))
+#define DL_DT_FUNCTION_ADDRESS(map, start, attr, addr)			\
+  attr volatile unsigned int fptr[2];					\
+ /* The test for "start & 2" below is to accommodate old binaries which	\
+    violated the ELF ABI by pointing DT_INIT and DT_FINI at a function	\
+    descriptor.  */							\
+  if ((ElfW(Addr)) (start) & 2)						\
+    addr = (ElfW(Addr)) start;						\
+  else									\
+    {									\
+      fptr[0] = (unsigned int) (start);					\
+      fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;			\
+      /* Set bit 30 to indicate to $$dyncall that this is a PLABEL. */	\
+      addr = (ElfW(Addr))((unsigned int)fptr | 2);			\
+    }									\
+
+#define DL_CALL_DT_INIT(map, start, argc, argv, env)	\
+{							\
+  ElfW(Addr) addr;					\
+  DL_DT_FUNCTION_ADDRESS(map, start, , addr)		\
+  init_t init = (init_t) addr; 				\
+  init (argc, argv, env);				\
+}
+
+#define DL_CALL_DT_FINI(map, start)		\
+{						\
+  ElfW(Addr) addr;				\
+  DL_DT_FUNCTION_ADDRESS(map, start, , addr)	\
+  fini_t fini = (fini_t) addr;			\
+  fini ();					\
+}
 
 /* The type of the return value of fixup/profile_fixup */
 #define DL_FIXUP_VALUE_TYPE struct fdesc
diff --git a/ports/sysdeps/hppa/dl-machine.h b/ports/sysdeps/hppa/dl-machine.h
index d2411a6..e47e947 100644
--- a/ports/sysdeps/hppa/dl-machine.h
+++ b/ports/sysdeps/hppa/dl-machine.h
@@ -490,8 +490,12 @@ asm (									\
 #define ELF_MACHINE_NO_REL 1
 
 /* Return the address of the entry point. */
-#define ELF_MACHINE_START_ADDRESS(map, start) \
-  DL_STATIC_FUNCTION_ADDRESS (map, start)
+#define ELF_MACHINE_START_ADDRESS(map, start)			\
+({								\
+	ElfW(Addr) addr;					\
+	DL_DT_FUNCTION_ADDRESS(map, start, static, addr)	\
+	addr;							\
+})
 
 /* We define an initialization functions.  This is called very early in
  *    _dl_sysdep_start.  */
diff --git a/ports/sysdeps/ia64/dl-lookupcfg.h b/ports/sysdeps/ia64/dl-lookupcfg.h
index 4da1263..cfaa252 100644
--- a/ports/sysdeps/ia64/dl-lookupcfg.h
+++ b/ports/sysdeps/ia64/dl-lookupcfg.h
@@ -39,24 +39,28 @@ extern void _dl_unmap (struct link_map *map);
 
 #define DL_UNMAP(map) _dl_unmap (map)
 
-#define DL_AUTO_FUNCTION_ADDRESS(map, addr)		\
-({							\
-  unsigned long int fptr[2];				\
-  fptr[0] = (unsigned long int) (addr);			\
-  fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;	\
-  (Elf64_Addr) fptr;					\
-})
-
-#define DL_STATIC_FUNCTION_ADDRESS(map, addr)		\
-({							\
-  static unsigned long int fptr[2];			\
-  fptr[0] = (unsigned long int) (addr);			\
-  fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;	\
-  (Elf64_Addr) fptr;					\
-})
-
-#define DL_DT_INIT_ADDRESS(map, addr) DL_AUTO_FUNCTION_ADDRESS (map, addr)
-#define DL_DT_FINI_ADDRESS(map, addr) DL_AUTO_FUNCTION_ADDRESS (map, addr)
+#define DL_DT_FUNCTION_ADDRESS(map, start, attr, addr)			\
+  attr volatile unsigned long int fptr[2];					\
+  fptr[0] = (unsigned long int) (start);					\
+  fptr[1] = (map)->l_info[DT_PLTGOT]->d_un.d_ptr;			\
+  addr = (ElfW(Addr)) fptr;						\
+
+#define DL_CALL_DT_INIT(map, start, argc, argv, env)	\
+{							\
+  ElfW(Addr) addr;					\
+  DL_DT_FUNCTION_ADDRESS(map, start, , addr)		\
+  init_t init = (init_t) addr; 				\
+  init (argc, argv, env);				\
+}
+
+#define DL_CALL_DT_FINI(map, start)		\
+{						\
+  ElfW(Addr) addr;				\
+  DL_DT_FUNCTION_ADDRESS(map, start, , addr)	\
+  fini_t fini = (fini_t) addr;			\
+  fini ();					\
+}
+
 /* The type of the return value of fixup/profile_fixup.  */
 #define DL_FIXUP_VALUE_TYPE struct fdesc
 /* Construct a value of type DL_FIXUP_VALUE_TYPE from a code address
diff --git a/ports/sysdeps/ia64/dl-machine.h b/ports/sysdeps/ia64/dl-machine.h
index dd469d7..6123637 100644
--- a/ports/sysdeps/ia64/dl-machine.h
+++ b/ports/sysdeps/ia64/dl-machine.h
@@ -322,8 +322,12 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
 #define ELF_MACHINE_NO_REL 1
 
 /* Return the address of the entry point. */
-#define ELF_MACHINE_START_ADDRESS(map, start)	\
-  DL_STATIC_FUNCTION_ADDRESS (map, start)
+#define ELF_MACHINE_START_ADDRESS(map, start)			\
+({								\
+	ElfW(Addr) addr;					\
+	DL_DT_FUNCTION_ADDRESS(map, start, static, addr)	\
+	addr;							\
+})
 
 /* Fixup a PLT entry to bounce directly to the function at VALUE.  */
 static inline struct fdesc __attribute__ ((always_inline))
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index e7b0516..146aca4 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -76,8 +76,9 @@ typedef struct link_map *lookup_t;
 # define DL_SYMBOL_ADDRESS(map, ref) \
  (void *) (LOOKUP_VALUE_ADDRESS (map) + ref->st_value)
 # define DL_LOOKUP_ADDRESS(addr) ((ElfW(Addr)) (addr))
-# define DL_DT_INIT_ADDRESS(map, start) (start)
-# define DL_DT_FINI_ADDRESS(map, start) (start)
+# define DL_CALL_DT_INIT(map, start, argc, argv, env) \
+ ((init_t) (start)) (argc, argv, env)
+# define DL_CALL_DT_FINI(map, start) ((fini_t) (start)) ()
 #endif
 
 /* On some architectures dladdr can't use st_size of all symbols this way.  */

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

commit b15ad643798707d247598a765edfa0ac0e8088c5
Author: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date:   Thu Oct 31 12:37:50 2013 +1000

    Accept make versions 4.0 and greater
    
    URL: https://bugs.gentoo.org/487906
    
    (cherry picked from commit 28d708c44bc47b56f6551ff285f78edcf61c208a)

diff --git a/configure b/configure
index 1ee4c42..804fd7e 100755
--- a/configure
+++ b/configure
@@ -4772,7 +4772,7 @@ $as_echo_n "checking version of $MAKE... " >&6; }
   ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    3.79* | 3.[89]*)
+    3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*)
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
diff --git a/configure.in b/configure.in
index 769e8ef..2364142 100644
--- a/configure.in
+++ b/configure.in
@@ -989,7 +989,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v,
   critic_missing="$critic_missing gcc")
 AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version,
   [GNU Make[^0-9]*\([0-9][0-9.]*\)],
-  [3.79* | 3.[89]*], critic_missing="$critic_missing make")
+  [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make")
 
 AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version,
   [GNU gettext.* \([0-9]*\.[0-9.]*\)],

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

commit d8827b41e4a39c352bd8478671398b63a76dc03a
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Mon Sep 2 23:13:57 2013 -0400

    hppa: add fanotify_mark
    
    Another example of all the 64bit arches getting the definition via a
    common file, but the 32bit ones all adding it by themselves and hppa
    was missed.
    
    I'm not entirely sure about the usage of GLIBC_2.19 symbols here.
    We'd like to backport this so people can use it, but it means we'd
    be releasing a glibc-2.17/glibc-2.18 with a GLIBC_2.19 symbol in it.
    But maybe it won't be a big deal since you'd only get that 2.19 ref
    if you actually used the symbol ?
    
    There hasn't been a glibc release where hppa worked w/out a bunch of
    patches, so in reality there's only two distros that matter -- Gentoo
    and Debian.
    
    URL: https://bugs.gentoo.org/480268
    Reported-by: Jeroen Roovers <jer@gentoo.org>
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    
    (cherry picked from commit 18d4371683fbe347bf4fbaef05d18b5a4918887a)

diff --git a/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list b/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list
index ae36d46..1fc10d9 100644
--- a/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -36,3 +36,4 @@ socketpair	-	socketpair	i:iiif	__socketpair	socketpair
 setrlimit	-	setrlimit	i:ip	__setrlimit	setrlimit
 getrlimit	-	getrlimit	i:ip	__getrlimit	getrlimit
 prlimit64	EXTRA	prlimit64	i:iipp	__prlimit64	prlimit64@@GLIBC_2.17
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	fanotify_mark

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

commit f73b1129ae3e1f1f2a36b58442c5b35a6ce40827
Author: Richard Henderson <rth@twiddle.net>
Date:   Sat Nov 16 06:34:39 2013 +1000

    alpha: Fix signal thunk unwind info
    
    2013-11-16  Richard Henderson  <rth@redhat.com>
    
    	* sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Include a nop
    	before each signal thunk.
    
    URL: https://bugs.gentoo.org/480740
    URL: https://sourceware.org/ml/libc-ports/2013-11/msg00000.html
    
    (cherry picked from commit 027e32bd42314e17095ba39df82ef293f4a72c09)

diff --git a/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S b/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
index 3d291fd..6efa738 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S
@@ -83,14 +83,21 @@ PSEUDO_END(__syscall_rt_sigaction)
 	cfi_offset (64, \base + 2 * 8)
 	.endm
 
-	.align	4
-
 	cfi_startproc
 	cfi_return_column (64)
 	.cfi_signal_frame
 	SIGCONTEXT_REGS -648
-
 	cfi_def_cfa_offset (648)
+
+	/* While this frame is marked as a signal frame, that only applies
+	   to how this return address is handled for the outer frame.
+	   The return address that arrived here, from the inner frame, is
+	   not marked as a signal frame and so the unwinder still tries to
+	   subtract 1 to examine the presumed call insn.  Thus we must
+	   extend the unwind info to a nop before the start.  */
+	nop
+	.align 4
+
 __syscall_sigreturn:
 	mov	sp, a0
 	ldi	v0, __NR_sigreturn
@@ -98,8 +105,11 @@ __syscall_sigreturn:
 	.size	__syscall_sigreturn, .-__syscall_sigreturn
 	.type	__syscall_sigreturn, @function
 
-	.align 4
+	/* See above wrt including the nop.  */
 	cfi_def_cfa_offset (176 + 648)
+	nop
+	.align 4
+
 __syscall_rt_sigreturn:
 	mov	sp,a0
 	ldi	v0,__NR_rt_sigreturn

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

Summary of changes:
 configure                                          |    2 +-
 configure.in                                       |    2 +-
 elf/dl-close.c                                     |    5 +-
 elf/dl-fini.c                                      |    2 +-
 elf/dl-init.c                                      |    8 +---
 ports/sysdeps/hppa/dl-lookupcfg.h                  |   56 +++++++++++---------
 ports/sysdeps/hppa/dl-machine.h                    |    8 ++-
 ports/sysdeps/ia64/dl-lookupcfg.h                  |   40 ++++++++------
 ports/sysdeps/ia64/dl-machine.h                    |    8 ++-
 ports/sysdeps/unix/sysv/linux/alpha/rt_sigaction.S |   18 +++++--
 ports/sysdeps/unix/sysv/linux/hppa/syscalls.list   |    1 +
 sysdeps/generic/ldsodefs.h                         |    5 +-
 12 files changed, 88 insertions(+), 67 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]