[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commits] r23799 - in /fsf/trunk/libc: ./ debug/ math/ sysdeps/ieee754/ldbl-128ibm/ sysdeps/powerpc/powerpc32/ sysdeps/powerpc/powerpc...



Author: eglibc
Date: Wed Aug 21 00:02:14 2013
New Revision: 23799

Log:
Import glibc-mainline for 2013-08-21

Added:
    fsf/trunk/libc/debug/tst-backtrace6.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/Makefile
    fsf/trunk/libc/NEWS
    fsf/trunk/libc/debug/Makefile
    fsf/trunk/libc/debug/tst-backtrace5.c
    fsf/trunk/libc/math/libm-test.inc
    fsf/trunk/libc/math/s_cproj.c
    fsf/trunk/libc/math/s_cprojf.c
    fsf/trunk/libc/math/s_cprojl.c
    fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_cprojl.c
    fsf/trunk/libc/sysdeps/powerpc/powerpc32/backtrace.c
    fsf/trunk/libc/sysdeps/powerpc/powerpc64/backtrace.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
    fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/init-first.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Wed Aug 21 00:02:14 2013
@@ -1,3 +1,42 @@
+2013-07-23  Adhemerval Zanella  <azanella@xxxxxxxxxxxxxxxxxx>
+
+	[BZ #15867]
+	* sysdeps/powerpc/powerpc32/backtrace.c (__backtrace): Handle signal
+	trampoline stack frame information.
+	* sysdeps/powerpc/powerpc64/backtrace.c (__backtrace): Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
+	(__vdso_sigtramp_rt64): New variable: PPC64 signal trampoline.
+	(__vdso_sigtramp32): New variable: PPC32 signal trampoline.
+	(__vdso_sigtramp_rt32): New variable: PPC32 signal trampoline.
+	* sysdeps/unix/sysv/linux/powerpc/init-first.c
+	(_libc_vdso_platform_setup): Initialize the signal trampolines.
+	* debug/tst-backtrace5.c (fn): Add an option set modify sigaction
+	sa_flags value.
+	* debug/tst-backtrace6.c: New file: check backtrace for signal frames,
+	interrupting a syscall and set with option SA_SIGINFO.
+
+2013-08-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+
+	[BZ #15531]
+	* math/s_cproj.c (__cproj): Only return an infinity if one part of
+	argument is infinite.
+	* math/s_cprojf.c (__cprojf): Likewise.
+	* math/s_cprojl.c (__cprojl): Likewise.
+	* sysdeps/ieee754/ldbl-128ibm/s_cprojl.c (__cprojl): Likewise.
+	* math/libm-test.inc (cproj_test_data): Add more tests.
+
+	* sysdeps/unix/sysv/linux/mmap64.c: Include <string.h>.
+
+	* sysdeps/unix/sysv/linux/mmap64.c (__mmap64)
+	[MMAP2_PAGE_SHIFT == -1]: Use __getpagesize to determine page
+	size.  Use __ffs to determine corresponding shift.
+
+2013-08-20  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
+	    Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* Makefile (INSTALL): Remove trailing blank lines from output of
+	makeinfo.
+
 2013-08-20  Andreas Krebbel  <Andreas.Krebbel@xxxxxxxxxx>
 
 	* sysdeps/unix/sysv/linux/s390/sys/procfs.h (struct elf_prstatus):

Modified: fsf/trunk/libc/Makefile
==============================================================================
--- fsf/trunk/libc/Makefile (original)
+++ fsf/trunk/libc/Makefile Wed Aug 21 00:02:14 2013
@@ -403,8 +403,13 @@
 INSTALL: manual/install.texi manual/macros.texi \
 	 $(common-objpfx)manual/pkgvers.texi
 	makeinfo --no-validate --plaintext --no-number-sections \
-		 -I$(common-objpfx)manual $< -o $@
-	-chmod a-w $@
+		 -I$(common-objpfx)manual $< -o $@-tmp
+	$(AWK) 'NF == 0 { ++n; next } \
+		NF != 0 { while (n-- > 0) print ""; n = 0; print }' \
+	  < $@-tmp > $@-tmp2
+	rm -f $@-tmp
+	-chmod a-w $@-tmp2
+	mv -f $@-tmp2 $@
 $(common-objpfx)manual/%: FORCE
 	$(MAKE) $(PARALLELMFLAGS) -C manual $@
 FORCE:

Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Wed Aug 21 00:02:14 2013
@@ -9,7 +9,7 @@
 
 * The following bugs are resolved with this release:
 
-  14699, 15749
+  14699, 15531, 15749
 
 * CVE-2013-4237 The readdir_r function could write more than NAME_MAX bytes
   to the d_name member of struct dirent, or omit the terminating NUL

Modified: fsf/trunk/libc/debug/Makefile
==============================================================================
--- fsf/trunk/libc/debug/Makefile (original)
+++ fsf/trunk/libc/debug/Makefile Wed Aug 21 00:02:14 2013
@@ -130,16 +130,18 @@
 CFLAGS-tst-backtrace3.c += -funwind-tables
 CFLAGS-tst-backtrace4.c += -funwind-tables
 CFLAGS-tst-backtrace5.c += -funwind-tables
+CFLAGS-tst-backtrace6.c += -funwind-tables
 LDFLAGS-tst-backtrace2 = -rdynamic
 LDFLAGS-tst-backtrace3 = -rdynamic
 LDFLAGS-tst-backtrace4 = -rdynamic
 LDFLAGS-tst-backtrace5 = -rdynamic
+LDFLAGS-tst-backtrace6 = -rdynamic
 
 tests = backtrace-tst tst-longjmp_chk tst-chk1 tst-chk2 tst-chk3 \
 	tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk \
 	tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 \
 	tst-longjmp_chk2 tst-backtrace2 tst-backtrace3 tst-backtrace4 \
-	tst-backtrace5
+	tst-backtrace5 tst-backtrace6
 
 tests-ifunc := $(stpcpy_chk strcpy_chk:%=test-%-ifunc)
 tests += $(tests-ifunc)

Modified: fsf/trunk/libc/debug/tst-backtrace5.c
==============================================================================
--- fsf/trunk/libc/debug/tst-backtrace5.c (original)
+++ fsf/trunk/libc/debug/tst-backtrace5.c Wed Aug 21 00:02:14 2013
@@ -27,6 +27,10 @@
 #include <unistd.h>
 
 #include "tst-backtrace.h"
+
+#ifndef SIGACTION_FLAGS
+# define SIGACTION_FLAGS 0
+#endif
 
 static int do_test (void);
 #define TEST_FUNCTION do_test ()
@@ -91,7 +95,7 @@
 }
 
 NO_INLINE int
-fn (int c)
+fn (int c, int flags)
 {
   pid_t parent_pid, child_pid;
   int pipefd[2];
@@ -100,12 +104,13 @@
 
   if (c > 0)
     {
-      fn (c - 1);
+      fn (c - 1, flags);
       return x;
     }
 
   memset (&act, 0, sizeof (act));
   act.sa_handler = handle_signal;
+  act.sa_flags = flags;
   sigemptyset (&act.sa_mask);
   sigaction (SIGUSR1, &act, NULL);
   parent_pid = getpid ();
@@ -131,6 +136,6 @@
 NO_INLINE static int
 do_test (void)
 {
-  fn (2);
+  fn (2, SIGACTION_FLAGS);
   return ret;
 }

Added: fsf/trunk/libc/debug/tst-backtrace6.c
==============================================================================
--- fsf/trunk/libc/debug/tst-backtrace6.c (added)
+++ fsf/trunk/libc/debug/tst-backtrace6.c Wed Aug 21 00:02:14 2013
@@ -1,0 +1,21 @@
+/* Test backtrace and backtrace_symbols for signal frames, where a
+   system call was interrupted by a signal.
+   Copyright (C) 2013 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define SIGACTION_FLAGS SA_SIGINFO
+#include <debug/tst-backtrace5.c>

Modified: fsf/trunk/libc/math/libm-test.inc
==============================================================================
--- fsf/trunk/libc/math/libm-test.inc (original)
+++ fsf/trunk/libc/math/libm-test.inc Wed Aug 21 00:02:14 2013
@@ -7066,10 +7066,50 @@
 
     TEST_c_c (cproj, qnan_value, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
 
+    TEST_c_c (cproj, plus_zero, qnan_value, plus_zero, qnan_value, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_zero, qnan_value, minus_zero, qnan_value, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, qnan_value, plus_zero, qnan_value, plus_zero, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, qnan_value, minus_zero, qnan_value, minus_zero, NO_INEXACT_EXCEPTION),
+
+    TEST_c_c (cproj, 1.0, qnan_value, 1.0, qnan_value, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, -1.0, qnan_value, -1.0, qnan_value, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, qnan_value, 1.0, qnan_value, 1.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, qnan_value, -1.0, qnan_value, -1.0, NO_INEXACT_EXCEPTION),
+
     TEST_c_c (cproj, plus_infty, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
     TEST_c_c (cproj, plus_infty, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
     TEST_c_c (cproj, minus_infty, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
     TEST_c_c (cproj, minus_infty, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+
+    TEST_c_c (cproj, plus_infty, plus_zero, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, plus_infty, minus_zero, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_infty, plus_zero, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_infty, minus_zero, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+
+    TEST_c_c (cproj, plus_zero, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, plus_zero, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_zero, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_zero, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+
+    TEST_c_c (cproj, plus_infty, 1.0, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, plus_infty, -1.0, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_infty, 1.0, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_infty, -1.0, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+
+    TEST_c_c (cproj, 1.0, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, 1.0, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, -1.0, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, -1.0, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+
+    TEST_c_c (cproj, plus_infty, qnan_value, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, plus_infty, -qnan_value, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_infty, qnan_value, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, minus_infty, -qnan_value, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+
+    TEST_c_c (cproj, qnan_value, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, qnan_value, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, -qnan_value, plus_infty, plus_infty, 0.0, NO_INEXACT_EXCEPTION),
+    TEST_c_c (cproj, -qnan_value, minus_infty, plus_infty, minus_zero, NO_INEXACT_EXCEPTION),
 
     TEST_c_c (cproj, 1.0, 0.0, 1.0, 0.0, NO_INEXACT_EXCEPTION),
     TEST_c_c (cproj, 2.0, 3.0, 2.0, 3.0, NO_INEXACT_EXCEPTION),

Modified: fsf/trunk/libc/math/s_cproj.c
==============================================================================
--- fsf/trunk/libc/math/s_cproj.c (original)
+++ fsf/trunk/libc/math/s_cproj.c Wed Aug 21 00:02:14 2013
@@ -24,9 +24,7 @@
 __complex__ double
 __cproj (__complex__ double x)
 {
-  if (isnan (__real__ x) && isnan (__imag__ x))
-    return x;
-  else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+  if (__isinf_ns (__real__ x) || __isinf_ns (__imag__ x))
     {
       __complex__ double res;
 

Modified: fsf/trunk/libc/math/s_cprojf.c
==============================================================================
--- fsf/trunk/libc/math/s_cprojf.c (original)
+++ fsf/trunk/libc/math/s_cprojf.c Wed Aug 21 00:02:14 2013
@@ -24,9 +24,7 @@
 __complex__ float
 __cprojf (__complex__ float x)
 {
-  if (isnan (__real__ x) && isnan (__imag__ x))
-    return x;
-  else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+  if (__isinf_nsf (__real__ x) || __isinf_nsf (__imag__ x))
     {
       __complex__ float res;
 

Modified: fsf/trunk/libc/math/s_cprojl.c
==============================================================================
--- fsf/trunk/libc/math/s_cprojl.c (original)
+++ fsf/trunk/libc/math/s_cprojl.c Wed Aug 21 00:02:14 2013
@@ -24,9 +24,7 @@
 __complex__ long double
 __cprojl (__complex__ long double x)
 {
-  if (isnan (__real__ x) && isnan (__imag__ x))
-    return x;
-  else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+  if (__isinf_nsl (__real__ x) || __isinf_nsl (__imag__ x))
     {
       __complex__ long double res;
 

Modified: fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_cprojl.c
==============================================================================
--- fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_cprojl.c (original)
+++ fsf/trunk/libc/sysdeps/ieee754/ldbl-128ibm/s_cprojl.c Wed Aug 21 00:02:14 2013
@@ -24,9 +24,7 @@
 __complex__ long double
 __cprojl (__complex__ long double x)
 {
-  if (isnan (__real__ x) && isnan (__imag__ x))
-    return x;
-  else if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+  if (__isinf_nsl (__real__ x) || __isinf_nsl (__imag__ x))
     {
       __complex__ long double res;
 

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc32/backtrace.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc32/backtrace.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc32/backtrace.c Wed Aug 21 00:02:14 2013
@@ -18,6 +18,9 @@
 
 #include <execinfo.h>
 #include <stddef.h>
+#include <string.h>
+#include <signal.h>
+#include <bits/libc-vdso.h>
 
 /* This is the stack layout we see with every stack frame.
    Note that every routine is required by the ABI to lay out the stack
@@ -35,6 +38,46 @@
   void *return_address;
 };
 
+#define SIGNAL_FRAMESIZE 64
+
+/* Since the signal handler is just like any other function it needs to
+   save/restore its LR and it will save it into callers stack frame.
+   Since a signal handler doesn't have a caller, the kernel creates a
+   dummy frame to make it look like it has a caller.  */
+struct signal_frame_32 {
+  char               dummy[SIGNAL_FRAMESIZE];
+  struct sigcontext  sctx;
+  mcontext_t         mctx;
+  /* We don't care about the rest, since IP value is at 'mctx' field.  */
+};
+
+static inline int
+is_sigtramp_address (unsigned int nip)
+{
+#ifdef SHARED
+  if (nip == (unsigned int)__vdso_sigtramp32)
+    return 1;
+#endif
+  return 0;
+}
+
+struct rt_signal_frame_32 {
+  char               dummy[SIGNAL_FRAMESIZE + 16];
+  siginfo_t          info;
+  struct ucontext    uc;
+  /* We don't care about the rest, since IP value is at 'uc' field.  */
+};
+
+static inline int
+is_sigtramp_address_rt (unsigned int nip)
+{
+#ifdef SHARED
+  if (nip == (unsigned int)__vdso_sigtramp_rt32)
+    return 1;
+#endif
+  return 0;
+}
+
 int
 __backtrace (void **array, int size)
 {
@@ -50,7 +93,28 @@
   for (				count = 0;
        current != NULL && 	count < size;
        current = current->next, count++)
-    array[count] = current->return_address;
+    {
+      gregset_t *gregset = NULL;
+
+      array[count] = current->return_address;
+
+      /* Check if the symbol is the signal trampoline and get the interrupted
+       * symbol address from the trampoline saved area.  */
+      if (is_sigtramp_address ((unsigned int)current->return_address))
+	{
+	  struct signal_frame_32 *sigframe =
+	    (struct signal_frame_32*) current;
+          gregset = &sigframe->mctx.gregs;
+        }
+      else if (is_sigtramp_address_rt ((unsigned int)current->return_address))
+	{
+	  struct rt_signal_frame_32 *sigframe =
+            (struct rt_signal_frame_32*) current;
+          gregset = &sigframe->uc.uc_mcontext.uc_regs->gregs;
+        }
+      if (gregset)
+	array[++count] = (void*)((*gregset)[PT_NIP]);
+    }
 
   /* It's possible the second-last stack frame can't return
      (that is, it's __libc_start_main), in which case

Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/backtrace.c
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/backtrace.c (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/backtrace.c Wed Aug 21 00:02:14 2013
@@ -18,6 +18,9 @@
 
 #include <execinfo.h>
 #include <stddef.h>
+#include <string.h>
+#include <signal.h>
+#include <bits/libc-vdso.h>
 
 /* This is the stack layout we see with every stack frame.
    Note that every routine is required by the ABI to lay out the stack
@@ -38,6 +41,27 @@
   void *return_address;
 };
 
+/* Since the signal handler is just like any other function it needs to
+   save/restore its LR and it will save it into callers stack frame.
+   Since a signal handler doesn't have a caller, the kernel creates a
+   dummy frame to make it look like it has a caller.  */
+struct signal_frame_64 {
+#define SIGNAL_FRAMESIZE 128
+  char            dummy[SIGNAL_FRAMESIZE];
+  struct ucontext uc;
+  /* We don't care about the rest, since the IP value is at 'uc' field.  */
+};
+
+static inline int
+is_sigtramp_address (unsigned long nip)
+{
+#ifdef SHARED
+  if (nip == (unsigned long)__vdso_sigtramp_rt64)
+    return 1;
+#endif
+  return 0;
+}
+
 int
 __backtrace (void **array, int size)
 {
@@ -53,7 +77,17 @@
   for (				count = 0;
        current != NULL && 	count < size;
        current = current->next, count++)
-    array[count] = current->return_address;
+    {
+      array[count] = current->return_address;
+
+      /* Check if the symbol is the signal trampoline and get the interrupted
+       * symbol address from the trampoline saved area.  */
+      if (is_sigtramp_address ((unsigned long)current->return_address))
+        {
+	  struct signal_frame_64 *sigframe = (struct signal_frame_64*) current;
+          array[++count] = (void*)sigframe->uc.uc_mcontext.gp_regs[PT_NIP];
+	}
+    }
 
   /* It's possible the second-last stack frame can't return
      (that is, it's __libc_start_main), in which case

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/mmap64.c Wed Aug 21 00:02:14 2013
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <unistd.h>
 #include <sys/mman.h>
+#include <string.h>
 
 #include <sysdep.h>
 #include <sys/syscall.h>
@@ -42,9 +43,8 @@
 #if MMAP2_PAGE_SHIFT == -1
   if (page_shift == 0)
     {
-      int page_size = getpagesize ();
-      while ((1 << ++page_shift) != page_size)
-	;
+      int page_size = __getpagesize ();
+      page_shift = __ffs (page_size) - 1;
     }
 #endif
   if (offset & ((1 << page_shift) - 1))

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h Wed Aug 21 00:02:14 2013
@@ -34,6 +34,13 @@
 
 extern void *__vdso_time;
 
+#if defined(__PPC64__) || defined(__powerpc64__)
+extern void *__vdso_sigtramp_rt64;
+#else
+extern void *__vdso_sigtramp32;
+extern void *__vdso_sigtramp_rt32;
+#endif
+
 /* This macro is needed for PPC64 to return a skeleton OPD entry of a vDSO
    symbol.  This works because _dl_vdso_vsym always return the function
    address, and no vDSO symbols use the TOC or chain pointers from the OPD

Modified: fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/init-first.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/init-first.c (original)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/init-first.c Wed Aug 21 00:02:14 2013
@@ -29,6 +29,12 @@
 void *__vdso_get_tbfreq;
 void *__vdso_getcpu;
 void *__vdso_time;
+#if defined(__PPC64__) || defined(__powerpc64__)
+void *__vdso_sigtramp_rt64;
+#else
+void *__vdso_sigtramp32;
+void *__vdso_sigtramp_rt32;
+#endif
 
 static inline void
 _libc_vdso_platform_setup (void)
@@ -46,6 +52,16 @@
   __vdso_getcpu = _dl_vdso_vsym ("__kernel_getcpu", &linux2615);
 
   __vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615);
+
+  /* PPC64 uses only one signal trampoline symbol, while PPC32 will use
+     two depending if SA_SIGINFO is used (__kernel_sigtramp_rt32) or not
+     (__kernel_sigtramp32).  */
+#if defined(__PPC64__) || defined(__powerpc64__)
+  __vdso_sigtramp_rt64 = _dl_vdso_vsym ("__kernel_sigtramp_rt64", &linux2615);
+#else
+  __vdso_sigtramp32 = _dl_vdso_vsym ("__kernel_sigtramp32", &linux2615);
+  __vdso_sigtramp_rt32 = _dl_vdso_vsym ("__kernel_sigtramp_rt32", &linux2615);
+#endif
 }
 
 # define VDSO_SETUP _libc_vdso_platform_setup

_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits