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

[Commits] r19293 - in /trunk: ./ libc/ libc/elf/ libc/include/ libc/nptl/ libc/nptl/sysdeps/unix/sysv/linux/sh/ libc/sysdeps/gnu/ libc...



Author: joseph
Date: Mon Jun 25 21:30:45 2012
New Revision: 19293

Log:
Merge changes between r19234 and r19292 from /fsf/trunk.

Added:
    trunk/libc/sysdeps/sh/abort-instr.h
      - copied unchanged from r19292, fsf/trunk/libc/sysdeps/sh/abort-instr.h
    trunk/libc/sysdeps/unix/sysv/linux/sh/____longjmp_chk.S
      - copied unchanged from r19292, fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/____longjmp_chk.S
    trunk/libc/sysdeps/unix/sysv/linux/sh/sigaltstack-offsets.sym
      - copied unchanged from r19292, fsf/trunk/libc/sysdeps/unix/sysv/linux/sh/sigaltstack-offsets.sym
Removed:
    trunk/libc/sysdeps/mach/start.c
Modified:
    trunk/   (props changed)
    trunk/libc/ChangeLog
    trunk/libc/Makeconfig
    trunk/libc/NEWS
    trunk/libc/config.make.in
    trunk/libc/configure
    trunk/libc/configure.in
    trunk/libc/elf/dl-close.c
    trunk/libc/elf/dl-deps.c
    trunk/libc/elf/dl-libc.c
    trunk/libc/elf/rtld.c
    trunk/libc/include/link.h
    trunk/libc/nptl/ChangeLog
    trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
    trunk/libc/sysdeps/gnu/configure
    trunk/libc/sysdeps/gnu/configure.in
    trunk/libc/sysdeps/i386/init-first.c
    trunk/libc/sysdeps/mach/hurd/i386/static-start.S
    trunk/libc/sysdeps/s390/fpu/libm-test-ulps
    trunk/libc/sysdeps/sh/____longjmp_chk.S
    trunk/libc/sysdeps/sh/init-first.c
    trunk/libc/sysdeps/unix/sysv/linux/sh/Makefile
    trunk/libc/sysdeps/unix/sysv/linux/sh/Versions
    trunk/libc/sysdeps/unix/sysv/linux/sh/bits/atomic.h
    trunk/libc/sysdeps/unix/sysv/linux/sh/makecontext.S
    trunk/libc/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
    trunk/libc/sysdeps/unix/sysv/linux/sh/syscalls.list
    trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h
    trunk/ports/sysdeps/arm/bits/predefs.h   (props changed)

Propchange: trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun 25 21:30:45 2012
@@ -1,1 +1,1 @@
-/fsf/trunk:15224-19234
+/fsf/trunk:15224-19292

Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Mon Jun 25 21:30:45 2012
@@ -1,3 +1,93 @@
+2012-06-25  Andreas Jaeger  <aj@xxxxxxx>
+
+	* sysdeps/s390/fpu/libm-test-ulps: Update.
+
+2012-06-23  Andreas Schwab  <schwab@xxxxxxxxxxxxxx>
+	    Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sh/syscalls.list: Add fanotify_mark.
+	* sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.16): Add fanotify_mark.
+	* sysdeps/unix/sysv/linux/sh/nptl/libc.abilist (GLIBC_2.16): Add
+	fanotify_mark.
+
+2012-06-23  Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/mach/start.c: Remove file.
+	* sysdeps/mach/hurd/i386/static-start.S: Fix start.S include.
+	* sysdeps/i386/init-first.c: Fix comment regarding start.S.
+	* sysdeps/sh/init-first.c: Likewise.
+
+	* sysdeps/sh/____longjmp_chk.S (CALL_FAIL): Preserve r12 and pr
+	registers for frame unwinding purposes, add CFI directives.
+	* sysdeps/unix/sysv/linux/sh/____longjmp_chk.S (CALL_FAIL): Likewise.
+	* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Likewise
+	* sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER):
+	Likewise.
+
+	* sysdeps/sh/____longjmp_chk.S (CALL_FAIL): Don't plan for the call to
+	__fortify_fail returning.
+	* sysdeps/unix/sysv/linux/sh/____longjmp_chk.S (CALL_FAIL): Likewise.
+
+	* sysdeps/unix/sysv/linux/sh/____longjmp_chk.S: New file, based on
+	sysdeps/sh/____longjmp_chk.S.
+	* sysdeps/unix/sysv/linux/sh/sigaltstack-offsets.sym: New file, based
+	on sysdeps/unix/sysv/linux/x86_64/sigaltstack-offsets.sym.
+	* sysdeps/unix/sysv/linux/sh/Makefile [subdir=misc]
+	(gen-as-const-headers): Append sigaltstack-offsets.sym.
+
+	* sysdeps/sh/abort-instr.h: New file.
+	* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Terminate the
+	process in case exit returns.
+
+	* sysdeps/unix/sysv/linux/sh/makecontext.S (.Lexitcode): Always
+	initialize the GOT register before use.
+
+	* sysdeps/unix/sysv/linux/sh/makecontext.S (__makecontext): Fix
+	calculation of ARGC > 4.
+
+	* sysdeps/unix/sysv/linux/sh/makecontext.S: Add comments and give more
+	meaningful names to some local labels.
+
+2012-06-22  Nobuhiro Iwamatsu  <iwamatsu@xxxxxxxxxxx>
+	    Kaz Kojima  <kkojima@xxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sh/bits/atomic.h
+	(__arch_compare_and_exchange_val_8_acq): Remove explicit nop.
+	(__arch_compare_and_exchange_val_16_acq): Likewise.
+	(__arch_compare_and_exchange_val_32_acq): Likewise.
+	(atomic_exchange_and_add): Fix gUSA sequence.
+	(atomic_add): Likewise.
+	(atomic_add_negative): Likewise.
+	(atomic_add_zero): Likewise.
+	(atomic_bit_test_set): Likewise.
+
+2012-06-22  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	[BZ #13579]
+	* include/link.h (struct link_map): Add l_free_initfini.
+	* elf/dl-deps.c (_dl_map_object_deps): Set it when assigning
+	l_initfini.
+	* elf/dl-close.c (_dl_close_worker): Don't free l_initfini.
+	* elf/rtld.c (dl_main): Clear it on all objects loaded on startup.
+	* elf/dl-libc.c (free_mem): Free l_initfini if l_free_initfini is
+	set.
+
+2012-06-22  Carlos O'Donell  <carlos_odonell@xxxxxxxxxx>
+
+	* configure.in: Use AC_LANG_SOURCE.
+	* configure: Regenerate.
+
+2012-06-22  Roland McGrath  <roland@xxxxxxxxxxxxx>
+
+	* configure.in (libc_cv_localstatedir): New substituted variable.
+	* configure: Regenerated.
+	* config.make.in (localstatedir): New variable, substituted from
+	libc_cv_localstatedir.
+	* Makeconfig (vardbdir): Use $(localstatedir) in place of /var.
+	* sysdeps/gnu/configure.in (libc_cv_localstatedir): Change
+	${prefix}/var to /var when we change ${prefix}/etc to /etc.
+	* sysdeps/gnu/configure: Regenerated.
+
 2012-06-21  Jeff Law  <law@xxxxxxxxxx>
 
 	[BZ #14277]
@@ -23,7 +113,7 @@
 	[BZ #13882]
 	* elf/dl-deps.c (_dl_map_object_deps): Fix cycle detection.  Use
 	uint16_t for elements in the "seen" array to avoid char overflows.
-        * elf/dl-fini.c (_dl_sort_fini): Likewise.
+	* elf/dl-fini.c (_dl_sort_fini): Likewise.
 	* elf/dl-open.c (dl_open_worker): Likewise.
 
 2012-06-21  Carlos O'Donell  <carlos_odonell@xxxxxxxxxx>

Modified: trunk/libc/Makeconfig
==============================================================================
--- trunk/libc/Makeconfig (original)
+++ trunk/libc/Makeconfig Mon Jun 25 21:30:45 2012
@@ -287,7 +287,7 @@
 
 # Directory for the database files and Makefile for nss_db.
 ifndef vardbdir
-vardbdir = /var/db
+vardbdir = $(localstatedir)/db
 endif
 inst_vardbdir = $(install_root)$(vardbdir)
 

Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Mon Jun 25 21:30:45 2012
@@ -19,18 +19,19 @@
   12193, 12194, 12297, 12298, 12301, 12340, 12354, 12416, 12495, 13058,
   13223, 13361, 13525, 13526, 13527, 13528, 13529, 13530, 13531, 13532,
   13533, 13547, 13551, 13552, 13553, 13555, 13556, 13559, 13563, 13566,
-  13576, 13583, 13592, 13594, 13613, 13618, 13637, 13656, 13658, 13673,
-  13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738, 13739, 13743,
-  13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, 13806, 13824,
-  13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854, 13871, 13872,
-  13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892, 13895, 13908,
-  13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918, 13919,
-  13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928, 13938, 13941,
-  13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970, 13973, 13979,
-  13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036, 14040, 14043,
-  14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, 14075, 14080,
-  14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, 14134, 14153,
-  14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, 14277, 14278
+  13576, 13579, 13583, 13592, 13594, 13613, 13618, 13637, 13656, 13658,
+  13673, 13691, 13695, 13704, 13705, 13706, 13718, 13726, 13738, 13739,
+  13743, 13750, 13758, 13760, 13761, 13775, 13786, 13787, 13792, 13806,
+  13824, 13840, 13841, 13844, 13846, 13848, 13851, 13852, 13854, 13871,
+  13872, 13873, 13879, 13882, 13883, 13884, 13885, 13886, 13892, 13895,
+  13908, 13910, 13911, 13912, 13913, 13914, 13915, 13916, 13917, 13918,
+  13919, 13920, 13921, 13922, 13923, 13924, 13926, 13927, 13928, 13938,
+  13941, 13942, 13954, 13955, 13956, 13963, 13967, 13968, 13970, 13973,
+  13979, 13983, 13986, 13996, 14012, 14027, 14033, 14034, 14036, 14040,
+  14043, 14044, 14048, 14049, 14050, 14053, 14055, 14059, 14064, 14075,
+  14080, 14083, 14103, 14104, 14109, 14112, 14117, 14122, 14123, 14134,
+  14153, 14183, 14188, 14199, 14210, 14218, 14229, 14241, 14273, 14277,
+  14278
 
 * Support for the x32 ABI on x86-64 added.  The x32 target is selected by
   configuring glibc with:

Modified: trunk/libc/config.make.in
==============================================================================
--- trunk/libc/config.make.in (original)
+++ trunk/libc/config.make.in Mon Jun 25 21:30:45 2012
@@ -18,6 +18,7 @@
 infodir = @infodir@
 includedir = @includedir@
 datarootdir = @datarootdir@
+localstatedir = @libc_cv_localstatedir@
 
 # Should we use and build ldconfig?
 use-ldconfig = @use_ldconfig@

Modified: trunk/libc/configure
==============================================================================
--- trunk/libc/configure (original)
+++ trunk/libc/configure Mon Jun 25 21:30:45 2012
@@ -592,6 +592,7 @@
 libc_cv_cpp_asm_debuginfo
 libc_cv_forced_unwind
 libc_cv_rootsbindir
+libc_cv_localstatedir
 libc_cv_sysconfdir
 libc_cv_localedir
 libc_cv_slibdir
@@ -7543,6 +7544,7 @@
 use_ldconfig=no
 ldd_rewrite_script=no
 libc_cv_sysconfdir=$sysconfdir
+libc_cv_localstatedir=$localstatedir
 libc_cv_gcc_unwind_find_fde=no
 libc_cv_idn=no
 
@@ -7584,6 +7586,7 @@
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** be removed." >&5
 $as_echo "$as_me: WARNING: *** be removed." >&2;}
 fi
+
 
 
 

Modified: trunk/libc/configure.in
==============================================================================
--- trunk/libc/configure.in (original)
+++ trunk/libc/configure.in Mon Jun 25 21:30:45 2012
@@ -283,12 +283,12 @@
   AC_CACHE_CHECK([for systemtap static probe support], libc_cv_sdt, [dnl
   old_CFLAGS="$CFLAGS"
   CFLAGS="-std=gnu99 $CFLAGS"
-  AC_COMPILE_IFELSE([#include <sys/sdt.h>
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <sys/sdt.h>
 void foo (int i, void *p)
 {
   asm ("" STAP_PROBE_ASM (foo, bar, STAP_PROBE_ASM_TEMPLATE (2)) ""
        :: STAP_PROBE_ASM_OPERANDS (2, i, p));
-}], [libc_cv_sdt=yes], [libc_cv_sdt=no])
+}]])], [libc_cv_sdt=yes], [libc_cv_sdt=no])
   CFLAGS="$old_CFLAGS"])
   if test $libc_cv_sdt = yes; then
     AC_DEFINE([USE_STAP_PROBE])
@@ -2152,6 +2152,7 @@
 use_ldconfig=no
 ldd_rewrite_script=no
 libc_cv_sysconfdir=$sysconfdir
+libc_cv_localstatedir=$localstatedir
 libc_cv_gcc_unwind_find_fde=no
 libc_cv_idn=no
 
@@ -2192,6 +2193,7 @@
 AC_SUBST(libc_cv_slibdir)
 AC_SUBST(libc_cv_localedir)
 AC_SUBST(libc_cv_sysconfdir)
+AC_SUBST(libc_cv_localstatedir)
 AC_SUBST(libc_cv_rootsbindir)
 AC_SUBST(libc_cv_forced_unwind)
 

Modified: trunk/libc/elf/dl-close.c
==============================================================================
--- trunk/libc/elf/dl-close.c (original)
+++ trunk/libc/elf/dl-close.c Mon Jun 25 21:30:45 2012
@@ -1,5 +1,5 @@
 /* Close a shared object opened by `_dl_open'.
-   Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1996-2012 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
@@ -118,17 +118,8 @@
   if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
       || dl_close_state != not_pending)
     {
-      if (map->l_direct_opencount == 0)
-	{
-	  if (map->l_type == lt_loaded)
-	    dl_close_state = rerun;
-	  else if (map->l_type == lt_library)
-	    {
-	      struct link_map **oldp = map->l_initfini;
-	      map->l_initfini = map->l_orig_initfini;
-	      _dl_scope_free (oldp);
-	    }
-	}
+      if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
+	dl_close_state = rerun;
 
       /* There are still references to this object.  Do nothing more.  */
       if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))

Modified: trunk/libc/elf/dl-deps.c
==============================================================================
--- trunk/libc/elf/dl-deps.c (original)
+++ trunk/libc/elf/dl-deps.c Mon Jun 25 21:30:45 2012
@@ -1,6 +1,5 @@
 /* Load the dependencies of a mapped object.
-   Copyright (C) 1996-2003, 2004-2007, 2010-2012
-   Free Software Foundation, Inc.
+   Copyright (C) 1996-2012 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
@@ -488,6 +487,7 @@
 		  nneeded * sizeof needed[0]);
 	  atomic_write_barrier ();
 	  l->l_initfini = l_initfini;
+	  l->l_free_initfini = 1;
 	}
 
       /* If we have no auxiliary objects just go on to the next map.  */
@@ -688,6 +688,7 @@
   l_initfini[nlist] = NULL;
   atomic_write_barrier ();
   map->l_initfini = l_initfini;
+  map->l_free_initfini = 1;
   if (l_reldeps != NULL)
     {
       atomic_write_barrier ();
@@ -696,7 +697,7 @@
       _dl_scope_free (old_l_reldeps);
     }
   if (old_l_initfini != NULL)
-      map->l_orig_initfini = old_l_initfini;
+    _dl_scope_free (old_l_initfini);
 
   if (errno_reason)
     _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,

Modified: trunk/libc/elf/dl-libc.c
==============================================================================
--- trunk/libc/elf/dl-libc.c (original)
+++ trunk/libc/elf/dl-libc.c Mon Jun 25 21:30:45 2012
@@ -1,6 +1,5 @@
 /* Handle loading and unloading shared objects for internal libc purposes.
-   Copyright (C) 1999-2002,2004-2006,2009,2010,2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1999-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Zack Weinberg <zack@xxxxxxxxxxxxxxxxx>, 1999.
 
@@ -269,13 +268,13 @@
 
   for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
     {
-      /* Remove all additional names added to the objects.  */
       for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
 	{
 	  struct libname_list *lnp = l->l_libname->next;
 
 	  l->l_libname->next = NULL;
 
+	  /* Remove all additional names added to the objects.  */
 	  while (lnp != NULL)
 	    {
 	      struct libname_list *old = lnp;
@@ -283,6 +282,10 @@
 	      if (! old->dont_free)
 		free (old);
 	    }
+
+	  /* Free the initfini dependency list.  */
+	  if (l->l_free_initfini)
+	    free (l->l_initfini);
 	}
 
       if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0

Modified: trunk/libc/elf/rtld.c
==============================================================================
--- trunk/libc/elf/rtld.c (original)
+++ trunk/libc/elf/rtld.c Mon Jun 25 21:30:45 2012
@@ -2293,6 +2293,8 @@
 	      lnp->dont_free = 1;
 	      lnp = lnp->next;
 	    }
+	  /* Also allocated with the fake malloc().  */
+	  l->l_free_initfini = 0;
 
 	  if (l != &GL(dl_rtld_map))
 	    _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,

Modified: trunk/libc/include/link.h
==============================================================================
--- trunk/libc/include/link.h (original)
+++ trunk/libc/include/link.h Mon Jun 25 21:30:45 2012
@@ -1,6 +1,6 @@
 /* Data structure for communication from the run-time dynamic linker for
    loaded ELF shared objects.
-   Copyright (C) 1995-2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 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
@@ -191,6 +191,9 @@
 						 during LD_TRACE_PRELINKING=1
 						 contains any DT_SYMBOLIC
 						 libraries.  */
+    unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
+				       freed, ie. not allocated with
+				       the dummy malloc in ld.so.  */
 
     /* Collected information about own RPATH directories.  */
     struct r_search_path_struct l_rpath_dirs;
@@ -239,9 +242,6 @@
 
     /* List of object in order of the init and fini calls.  */
     struct link_map **l_initfini;
-    /* The init and fini list generated at startup, saved when the
-       object is also loaded dynamically.  */
-    struct link_map **l_orig_initfini;
 
     /* List of the dependencies introduced through symbol binding.  */
     struct link_map_reldeps

Modified: trunk/libc/nptl/ChangeLog
==============================================================================
--- trunk/libc/nptl/ChangeLog (original)
+++ trunk/libc/nptl/ChangeLog Mon Jun 25 21:30:45 2012
@@ -1,3 +1,8 @@
+2012-06-23  Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
+	(__lll_robust_timedlock_wait): Simplify CFI directives.
+
 2012-06-20  Siddhesh Poyarekar  <siddhesh@xxxxxxxxxx>
 
 	[BZ #12416]

Modified: trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
==============================================================================
--- trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (original)
+++ trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S Mon Jun 25 21:30:45 2012
@@ -139,6 +139,8 @@
 	cmp/hs	r0, r1
 	bt	3f
 
+	cfi_remember_state
+
 	mov.l	r11, @-r15
 	cfi_adjust_cfa_offset(4)
 	cfi_rel_offset (r11, 0)
@@ -258,13 +260,9 @@
 8:
 	bra	6b
 	 mov	#ETIMEDOUT, r0
+
+	cfi_restore_state
 3:
-	/* Restore initial state for invalid timeout case.  */
-	cfi_restore (r8)
-	cfi_restore (r9)
-	cfi_restore (r10)
-	cfi_restore (r11)
-	cfi_def_cfa_offset (0)
 	rts
 	 mov	#EINVAL, r0
 	cfi_endproc

Modified: trunk/libc/sysdeps/gnu/configure
==============================================================================
--- trunk/libc/sysdeps/gnu/configure (original)
+++ trunk/libc/sysdeps/gnu/configure Mon Jun 25 21:30:45 2012
@@ -25,12 +25,18 @@
     libc_cv_slibdir=/lib
     ;;
   esac
-  # Allow the user to override the path with --sysconfdir
+  # Allow the user to override the path with --sysconfdir.
   if test "$sysconfdir" = '${prefix}/etc'; then
     libc_cv_sysconfdir=/etc
   else
     libc_cv_sysconfdir=$sysconfdir
    fi
+  # Allow the user to override the path with --localstatedir.
+  if test "$localstatedir" = '${prefix}/var'; then
+    libc_cv_localstatedir=/var
+  else
+    libc_cv_localstatedir=$localstatedir
+   fi
   libc_cv_rootsbindir=/sbin
   ;;
 esac

Modified: trunk/libc/sysdeps/gnu/configure.in
==============================================================================
--- trunk/libc/sysdeps/gnu/configure.in (original)
+++ trunk/libc/sysdeps/gnu/configure.in Mon Jun 25 21:30:45 2012
@@ -25,12 +25,18 @@
     libc_cv_slibdir=/lib
     ;;
   esac
-  # Allow the user to override the path with --sysconfdir
+  # Allow the user to override the path with --sysconfdir.
   if test "$sysconfdir" = '${prefix}/etc'; then
     libc_cv_sysconfdir=/etc
   else
     libc_cv_sysconfdir=$sysconfdir
    fi
+  # Allow the user to override the path with --localstatedir.
+  if test "$localstatedir" = '${prefix}/var'; then
+    libc_cv_localstatedir=/var
+  else
+    libc_cv_localstatedir=$localstatedir
+   fi
   libc_cv_rootsbindir=/sbin
   ;;
 esac

Modified: trunk/libc/sysdeps/i386/init-first.c
==============================================================================
--- trunk/libc/sysdeps/i386/init-first.c (original)
+++ trunk/libc/sysdeps/i386/init-first.c Mon Jun 25 21:30:45 2012
@@ -48,7 +48,7 @@
 
 #ifdef SHARED
 /* This function is called to initialize the shared C library.
-   It is called just before the user _start code from i386/elf/start.S,
+   It is called just before the user _start code from i386/start.S,
    with the stack set up as that code gets it.  */
 
 /* NOTE!  The linker notices the magical name `_init' and sets the DT_INIT

Modified: trunk/libc/sysdeps/mach/hurd/i386/static-start.S
==============================================================================
--- trunk/libc/sysdeps/mach/hurd/i386/static-start.S (original)
+++ trunk/libc/sysdeps/mach/hurd/i386/static-start.S Mon Jun 25 21:30:45 2012
@@ -1,5 +1,5 @@
 /* Startup code for statically linked Hurd/i386 binaries.
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998-2012 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
@@ -24,4 +24,4 @@
 	jmp _start1
 
 #define _start _start1
-#include <sysdeps/i386/elf/start.S>
+#include <sysdeps/i386/start.S>

Removed: trunk/libc/sysdeps/mach/start.c
==============================================================================
--- trunk/libc/sysdeps/mach/start.c (original)
+++ trunk/libc/sysdeps/mach/start.c (removed)
@@ -1,103 +1,0 @@
-/* Copyright (C) 1992, 1993, 1994, 1995, 1997 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.
-
-   In addition to the permissions in the GNU Lesser General Public
-   License, the Free Software Foundation gives you unlimited
-   permission to link the compiled version of this file with other
-   programs, and to distribute those programs without any restriction
-   coming from the use of this file. (The GNU Lesser General Public
-   License restrictions do apply in other respects; for example, they
-   cover modification of the file, and distribution when not linked
-   into another program.)
-
-   Note that people who make modified versions of this file are not
-   obligated to grant this special exception for their modified
-   versions; it is their choice whether to do so. The GNU Lesser
-   General Public License gives permission to release a modified
-   version without this exception; this exception also makes it
-   possible to release a modified version which carries forward this
-   exception.
-
-   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/>.  */
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sysdep.h>
-
-#ifndef	__GNUC__
-  #error This file uses GNU C extensions; you must compile with GCC.
-#endif
-
-/* The first piece of initialized data.  */
-int __data_start = 0;
-
-#ifndef _HURD_THREADVAR_H
-volatile int errno;
-#endif
-
-extern void __mach_init (void);
-extern void __libc_init (int argc, char **argv, char **envp);
-extern int main (int argc, char **argv, char **envp);
-
-/* These are uninitialized common definitions so they will be zero
-   by default.  If the user links in C threads, that will provide initialized
-   definitions that override these.  */
-void *(*_cthread_init_routine) (void); /* Returns new SP to use.  */
-void (*_cthread_exit_routine) (int status);
-
-
-/* These are for communication from _start to start1,
-   where we cannot use the stack for anything.  */
-static int start_argc;
-static char **start_argv;
-
-/* _start calls this on the new stack.  */
-static volatile void
-start1 (void)
-{
-  __libc_init (start_argc, start_argv, __environ);
-
-  (_cthread_exit_routine != NULL ? *_cthread_exit_routine : exit)
-    (main (start_argc, start_argv, __environ));
-
-  /* Should never get here.  */
-  LOSE;
-}
-
-#ifndef START_ARGS
-#define START_ARGS void
-#endif
-#ifdef START_MACHDEP
-START_MACHDEP
-#define _start _start0
-#endif
-
-void
-_start (START_ARGS)
-{
-  SNARF_ARGS (start_argc, start_argv, __environ);
-
-  __mach_init ();
-
-  if (_cthread_init_routine != NULL)
-    CALL_WITH_SP (start1, (*_cthread_init_routine) ());
-  else
-    start1 ();
-
-  /* Should never get here.  */
-  LOSE;
-}

Modified: trunk/libc/sysdeps/s390/fpu/libm-test-ulps
==============================================================================
--- trunk/libc/sysdeps/s390/fpu/libm-test-ulps (original)
+++ trunk/libc/sysdeps/s390/fpu/libm-test-ulps Mon Jun 25 21:30:45 2012
@@ -1,9 +1,18 @@
 # Begin of automatic generation
 
 # acos_downward
+Test "acos_downward (-0) == pi/2":
+float: 1
+ifloat: 1
 Test "acos_downward (-0.5) == M_PI_6l*4.0":
 double: 1
 idouble: 1
+Test "acos_downward (-1) == pi":
+float: 1
+ifloat: 1
+Test "acos_downward (0) == pi/2":
+float: 1
+ifloat: 1
 Test "acos_downward (0.5) == M_PI_6l*2.0":
 double: 1
 float: 1
@@ -13,14 +22,34 @@
 ldouble: 1
 
 # acos_towardzero
+Test "acos_towardzero (-0) == pi/2":
+float: 1
+ifloat: 1
 Test "acos_towardzero (-0.5) == M_PI_6l*4.0":
 double: 1
 idouble: 1
+Test "acos_towardzero (-1) == pi":
+float: 1
+ifloat: 1
+Test "acos_towardzero (0) == pi/2":
+float: 1
+ifloat: 1
 Test "acos_towardzero (0.5) == M_PI_6l*2.0":
 double: 1
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
+
+# acos_upward
+Test "acos_upward (-0) == pi/2":
+ildouble: 1
+ldouble: 1
+Test "acos_upward (-1) == pi":
+ildouble: 1
+ldouble: 1
+Test "acos_upward (0) == pi/2":
 ildouble: 1
 ldouble: 1
 
@@ -551,6 +580,38 @@
 idouble: 1
 
 # ccos
+Test "Imaginary part of: ccos (-0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (-0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (-0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (-0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (-0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (-0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: ccos (-2 - 3 i) == -4.18962569096880723013255501961597373 - 9.10922789375533659797919726277886212 i":
 ildouble: 1
 ldouble: 1
@@ -567,8 +628,52 @@
 Test "Imaginary part of: ccos (0.75 + 1.25 i) == 1.38173873063425888530729933139078645 - 1.09193013555397466170919531722024128 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: ccos (0.75 + 11357.25 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (0.75 + 710.5 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (0.75 + 89.5 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (0.75 - 11357.25 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (0.75 - 710.5 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (0.75 - 89.5 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccos (0x1p-1074 + 1440 i) == inf - 5.981479269486130556466515778180916082415e301 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccos (0x1p-16434 + 22730 i) == inf - 1.217853148905605987081057582351152052687e4924 i":
+ildouble: 1
+ldouble: 1
 
 # ccosh
+Test "Imaginary part of: ccosh (-11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (-11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: ccosh (-2 - 3 i) == -3.72454550491532256547397070325597253 + 0.511822569987384608834463849801875634 i":
 float: 1
 ifloat: 1
@@ -579,6 +684,32 @@
 ifloat: 1
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: ccosh (-710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (-710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (-89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (-89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
 double: 1
 float: 1
@@ -587,6 +718,44 @@
 Test "Imaginary part of: ccosh (0.75 + 1.25 i) == 0.408242591877968807788852146397499084 + 0.780365930845853240391326216300863152 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: ccosh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: ccosh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: ccosh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 
 # cexp
 Test "Imaginary part of: cexp (-10000 + 0x1p16383 i) == 1.045876464564882298442774542991176546722e-4343 + 4.421154026488516836023811173959413420548e-4344 i":
@@ -656,6 +825,9 @@
 ifloat: 1
 ildouble: 1
 ldouble: 1
+Test "Imaginary part of: clog (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 709.8942846690411016323109979483151967689 + 0.4636476090008061606231772164674799632783 i":
+double: 1
+idouble: 1
 Test "Real part of: clog (0x1.fp+16383 + 0x1.fp+16383 i) == 11356.83823118610934184548269774874545400 + pi/4 i":
 ildouble: 1
 ldouble: 1
@@ -743,6 +915,9 @@
 float: 1
 ifloat: 1
 Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1.fffffffffffffp+1023 i) == 308.4052305577487344482591243175787477115 + pi/4*log10(e) i":
+double: 1
+idouble: 1
+Test "Imaginary part of: clog10 (0x1.fffffffffffffp+1023 + 0x1p+1023 i) == 308.3031705664207720674749211936626341569 + 0.2013595981366865903254995612594728746470 i":
 double: 1
 idouble: 1
 Test "Real part of: clog10 (0x1.fp+16383 + 0x1.fp+16383 i) == 4932.212175672014259683102930239951947672 + pi/4*log10(e) i":
@@ -981,9 +1156,9 @@
 ldouble: 2
 Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
 double: 1
-float: 4
-idouble: 1
-ifloat: 4
+float: 5
+idouble: 1
+ifloat: 5
 ildouble: 2
 ldouble: 2
 Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
@@ -998,26 +1173,166 @@
 ldouble: 1
 
 # csin
+Test "Real part of: csin (-0.75 + 11357.25 i) == -8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (-0.75 + 710.5 i) == -1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csin (-0.75 + 89.5 i) == -2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (-0.75 - 11357.25 i) == -8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (-0.75 - 710.5 i) == -1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csin (-0.75 - 89.5 i) == -2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
+ildouble: 1
+ldouble: 1
 Test "Imaginary part of: csin (-2 - 3 i) == -9.15449914691142957346729954460983256 + 4.16890695996656435075481305885375484 i":
 ildouble: 1
 ldouble: 1
 Test "Real part of: csin (0.75 + 1.25 i) == 1.28722291002649188575873510790565441 + 1.17210635989270256101081285116138863 i":
 ildouble: 1
 ldouble: 1
+Test "Real part of: csin (0.75 + 11357.25 i) == 8.385498349388321535962327491346664141020e4931 + 9.001213196851067077465606717616495588201e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 + 710.5 i) == 1.255317763348154410745082950806112487736e308 + 1.347490911916428129246890157395342279438e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csin (0.75 + 89.5 i) == 2.522786001038096774676288412995370563339e38 + 2.708024460708609732016532185663087200560e38 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 - 11357.25 i) == 8.385498349388321535962327491346664141020e4931 - 9.001213196851067077465606717616495588201e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 - 710.5 i) == 1.255317763348154410745082950806112487736e308 - 1.347490911916428129246890157395342279438e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csin (0.75 - 89.5 i) == 2.522786001038096774676288412995370563339e38 - 2.708024460708609732016532185663087200560e38 i":
+ildouble: 1
+ldouble: 1
+Test "Real part of: csin (0x1p-1074 + 1440 i) == 5.981479269486130556466515778180916082415e301 + inf i":
+double: 1
+idouble: 1
+Test "Real part of: csin (0x1p-16434 + 22730 i) == 1.217853148905605987081057582351152052687e4924 + inf i":
+ildouble: 1
+ldouble: 1
 
 # csinh
+Test "Imaginary part of: csinh (-11357.25 + 0.75 i) == -9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (-11357.25 - 0.75 i) == -9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
 Test "Real part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
 ildouble: 1
 ldouble: 1
 Test "Imaginary part of: csinh (-2 - 3 i) == 3.59056458998577995201256544779481679 - 0.530921086248519805267040090660676560 i":
 double: 1
 idouble: 1
+Test "Imaginary part of: csinh (-710.5 + 0.75 i) == -1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (-710.5 - 0.75 i) == -1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (-89.5 + 0.75 i) == -2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (-89.5 - 0.75 i) == -2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 Test "Real part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
 float: 1
 ifloat: 1
 Test "Imaginary part of: csinh (0.75 + 1.25 i) == 0.259294854551162779153349830618433028 + 1.22863452409509552219214606515777594 i":
 float: 1
 ifloat: 1
+Test "Imaginary part of: csinh (11357.25 + 0.75 i) == 9.001213196851067077465606717616495588201e4931 + 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (11357.25 - 0.75 i) == 9.001213196851067077465606717616495588201e4931 - 8.385498349388321535962327491346664141020e4931 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (1440 + 0x1p-1074 i) == inf + 5.981479269486130556466515778180916082415e301 i":
+double: 1
+idouble: 1
+Test "Imaginary part of: csinh (22730 + 0x1p-16434 i) == inf + 1.217853148905605987081057582351152052687e4924 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (710.5 + 0.75 i) == 1.347490911916428129246890157395342279438e308 + 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (710.5 - 0.75 i) == 1.347490911916428129246890157395342279438e308 - 1.255317763348154410745082950806112487736e308 i":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (89.5 + 0.75 i) == 2.708024460708609732016532185663087200560e38 + 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+Test "Real part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+ildouble: 1
+ldouble: 1
+Test "Imaginary part of: csinh (89.5 - 0.75 i) == 2.708024460708609732016532185663087200560e38 - 2.522786001038096774676288412995370563339e38 i":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
 
 # csqrt
 Test "Real part of: csqrt (-2 + 3 i) == 0.89597747612983812471573375529004348 + 1.6741492280355400404480393008490519 i":
@@ -1223,6 +1538,14 @@
 Test "exp10 (-1) == 0.1":
 double: 2
 idouble: 2
+Test "exp10 (-305) == 1.0e-305":
+double: 1
+idouble: 1
+Test "exp10 (-36) == 1.0e-36":
+double: 1
+idouble: 1
+ildouble: 1
+ldouble: 1
 Test "exp10 (0.75) == 5.62341325190349080394951039776481231":
 double: 1
 idouble: 1
@@ -1231,6 +1554,12 @@
 idouble: 6
 ildouble: 1
 ldouble: 1
+Test "exp10 (36) == 1.0e36":
+double: 1
+idouble: 1
+Test "exp10 (4932) == 1.0e4932":
+ildouble: 1
+ldouble: 1
 
 # exp2
 Test "exp2 (100.5) == 1.792728671193156477399422023278661496394e+30":
@@ -1279,6 +1608,9 @@
 ifloat: 1
 ildouble: 1
 ldouble: 1
+Test "expm1 (500.0) == 1.4035922178528374107397703328409120821806e+217":
+double: 1
+idouble: 1
 
 # gamma
 Test "gamma (-0.5) == log(2*sqrt(pi))":
@@ -2094,6 +2426,10 @@
 ildouble: 1
 ldouble: 1
 
+Function: "acos_upward":
+ildouble: 1
+ldouble: 1
+
 Function: "asin_downward":
 double: 1
 float: 1
@@ -2217,7 +2553,9 @@
 ldouble: 1
 
 Function: Imaginary part of "ccos":
-float: 1
+double: 1
+float: 1
+idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -2231,7 +2569,9 @@
 ldouble: 1
 
 Function: Imaginary part of "ccosh":
-float: 1
+double: 1
+float: 1
+idouble: 1
 ifloat: 1
 ildouble: 1
 ldouble: 1
@@ -2259,6 +2599,10 @@
 ifloat: 1
 ildouble: 1
 ldouble: 1
+
+Function: Imaginary part of "clog":
+double: 1
+idouble: 1
 
 Function: Real part of "clog10":
 double: 1
@@ -2328,9 +2672,9 @@
 
 Function: Real part of "cpow":
 double: 2
-float: 4
-idouble: 2
-ifloat: 4
+float: 5
+idouble: 2
+ifloat: 5
 ildouble: 11
 ldouble: 11
 
@@ -2343,6 +2687,10 @@
 ldouble: 1
 
 Function: Real part of "csin":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
 ildouble: 1
 ldouble: 1
 
@@ -2361,6 +2709,8 @@
 float: 1
 idouble: 1
 ifloat: 1
+ildouble: 1
+ldouble: 1
 
 Function: Real part of "csqrt":
 double: 1

Modified: trunk/libc/sysdeps/sh/____longjmp_chk.S
==============================================================================
--- trunk/libc/sysdeps/sh/____longjmp_chk.S (original)
+++ trunk/libc/sysdeps/sh/____longjmp_chk.S Mon Jun 25 21:30:45 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2012 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
@@ -28,14 +28,20 @@
 # define CALL_FAIL \
 	mov.l	.Lfail, r1;				\
 	mov.l	.Lstr, r4;				\
+	mov.l	r12, @-r15;				\
+	cfi_remember_state;				\
+	cfi_adjust_cfa_offset (4);			\
+	cfi_rel_offset (r12, 0);			\
 	mova	.Lgot, r0;				\
 	mov.l	.Lgot, r12;				\
 	add	r0, r12;				\
+	sts.l	pr, @-r15;				\
+	cfi_adjust_cfa_offset (4);			\
+	cfi_rel_offset (pr, 0);				\
 	bsrf	r1;					\
 	 add	r12, r4;				\
+	/* Unreachable.	 */				\
 .Lfail0:						\
-	bra	0f;					\
-	 nop;						\
 	.align	2;					\
 .Lgot:							\
 	.long	_GLOBAL_OFFSET_TABLE_;			\
@@ -43,21 +49,24 @@
 	.long	longjmp_msg@GOTOFF;			\
 .Lfail:							\
 	.long	__GI___fortify_fail@PLT-(.Lfail0-.);	\
-0:
+	cfi_restore_state;
 #else
 # define CALL_FAIL \
 	mov.l	.Lfail, r1;				\
 	mov.l	.Lstr, r4;				\
+	sts.l	pr, @-r15;				\
+	cfi_remember_state;				\
+	cfi_adjust_cfa_offset (4);			\
+	cfi_rel_offset (pr, 0);				\
 	jsr	@r1;					\
 	 nop;						\
-	bra	0f;					\
-	 nop;						\
+	/* Unreachable.	 */				\
 	.align	2;					\
 .Lstr:							\
 	.long	longjmp_msg;				\
 .Lfail:							\
 	.long	__fortify_fail;				\
-0:
+	cfi_restore_state;
 #endif
 
 #define CHECK_SP(reg) \

Modified: trunk/libc/sysdeps/sh/init-first.c
==============================================================================
--- trunk/libc/sysdeps/sh/init-first.c (original)
+++ trunk/libc/sysdeps/sh/init-first.c Mon Jun 25 21:30:45 2012
@@ -48,7 +48,7 @@
 
 #ifdef SHARED
 /* This function is called to initialize the shared C library.
-   It is called just before the user _start code from sh/sh[34]/elf/start.S,
+   It is called just before the user _start code from sh/sh[34]/start.S,
    with the stack set up as that code gets it.  */
 
 /* NOTE!  The linker notices the magical name `_init' and sets the DT_INIT

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/Makefile
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/Makefile (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/Makefile Mon Jun 25 21:30:45 2012
@@ -6,6 +6,10 @@
 gen-as-const-headers += ucontext_i.sym
 endif
 
+ifeq ($(subdir),misc)
+gen-as-const-headers += sigaltstack-offsets.sym
+endif
+
 ifeq ($(subdir),math)
 # The libm.so link can't find __fpscr_values
 libm.so-no-z-defs = yes

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/Versions
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/Versions (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/Versions Mon Jun 25 21:30:45 2012
@@ -28,4 +28,7 @@
   GLIBC_2.11 {
     fallocate64;
   }
+  GLIBC_2.16 {
+    fanotify_mark;
+  }
 }

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/bits/atomic.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/bits/atomic.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/bits/atomic.h Mon Jun 25 21:30:45 2012
@@ -1,5 +1,5 @@
 /* Atomic operations used inside libc.  Linux/SH version.
-   Copyright (C) 2003, 2011 Free Software Foundation, Inc.
+   Copyright (C) 2003-2012 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
@@ -73,11 +73,10 @@
 #define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
   ({ __typeof (*(mem)) __result; \
      __asm __volatile ("\
+	mova 1f,r0\n\
 	.align 2\n\
-	mova 1f,r0\n\
-	nop\n\
 	mov r15,r1\n\
-	mov #-8,r15\n\
+	mov #(0f-1f),r15\n\
      0: mov.b @%1,%0\n\
 	cmp/eq %0,%3\n\
 	bf 1f\n\
@@ -90,10 +89,10 @@
 #define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
   ({ __typeof (*(mem)) __result; \
      __asm __volatile ("\
+	mova 1f,r0\n\
+	mov r15,r1\n\
 	.align 2\n\
-	mova 1f,r0\n\
-	nop\n\
-	mov r15,r1\n\
+	mov #(0f-1f),r15\n\
 	mov #-8,r15\n\
      0: mov.w @%1,%0\n\
 	cmp/eq %0,%3\n\
@@ -107,11 +106,10 @@
 #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
   ({ __typeof (*(mem)) __result; \
      __asm __volatile ("\
+	mova 1f,r0\n\
 	.align 2\n\
-	mova 1f,r0\n\
-	nop\n\
 	mov r15,r1\n\
-	mov #-8,r15\n\
+	mov #(0f-1f),r15\n\
      0: mov.l @%1,%0\n\
 	cmp/eq %0,%3\n\
 	bf 1f\n\
@@ -133,40 +131,43 @@
   ({ __typeof (*(mem)) __result, __tmp, __value = (value); \
      if (sizeof (*(mem)) == 1) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  .align 2\n\
+	  mov r15,r1\n\
+	  mov #(0f-1f),r15\n\
        0: mov.b @%2,%0\n\
-	  add %0,%1\n\
-	  mov.b %1,@%2\n\
+	  mov %1,r2\n\
+	  add %0,r2\n\
+	  mov.b r2,@%2\n\
        1: mov r1,r15"\
 	: "=&r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
-	: "r0", "r1", "memory"); \
+	: "r0", "r1", "r2", "memory");		       \
      else if (sizeof (*(mem)) == 2) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  .align 2\n\
+	  mov r15,r1\n\
+	  mov #(0f-1f),r15\n\
        0: mov.w @%2,%0\n\
-	  add %0,%1\n\
-	  mov.w %1,@%2\n\
+	  mov %1,r2\n\
+	  add %0,r2\n\
+	  mov.w r2,@%2\n\
        1: mov r1,r15"\
 	: "=&r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
-	: "r0", "r1", "memory"); \
+	: "r0", "r1", "r2", "memory"); \
      else if (sizeof (*(mem)) == 4) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  .align 2\n\
+	  mov r15,r1\n\
+	  mov #(0f-1f),r15\n\
        0: mov.l @%2,%0\n\
-	  add %0,%1\n\
-	  mov.l %1,@%2\n\
+	  mov %1,r2\n\
+	  add %0,r2\n\
+	  mov.l r2,@%2\n\
        1: mov r1,r15"\
 	: "=&r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
-	: "r0", "r1", "memory"); \
+	: "r0", "r1", "r2", "memory"); \
      else \
        { \
 	 __typeof (mem) memp = (mem); \
@@ -182,37 +183,37 @@
   (void) ({ __typeof (*(mem)) __tmp, __value = (value); \
 	    if (sizeof (*(mem)) == 1) \
 	      __asm __volatile ("\
-		.align 2\n\
-		mova 1f,r0\n\
-		mov r15,r1\n\
-		mov #-6,r15\n\
+		mova 1f,r0\n\
+		mov r15,r1\n\
+		.align 2\n\
+		mov #(0f-1f),r15\n\
 	     0: mov.b @%1,r2\n\
-		add r2,%0\n\
-		mov.b %0,@%1\n\
+		add %0,r2\n\
+		mov.b r2,@%1\n\
 	     1: mov r1,r15"\
 		: "=&r" (__tmp) : rNOSP (mem), "0" (__value) \
 		: "r0", "r1", "r2", "memory"); \
 	    else if (sizeof (*(mem)) == 2) \
 	      __asm __volatile ("\
-		.align 2\n\
-		mova 1f,r0\n\
-		mov r15,r1\n\
-		mov #-6,r15\n\
+		mova 1f,r0\n\
+		mov r15,r1\n\
+		.align 2\n\
+		mov #(0f-1f),r15\n\
 	     0: mov.w @%1,r2\n\
-		add r2,%0\n\
-		mov.w %0,@%1\n\
+		add %0,r2\n\
+		mov.w r2,@%1\n\
 	     1: mov r1,r15"\
 		: "=&r" (__tmp) : rNOSP (mem), "0" (__value) \
 		: "r0", "r1", "r2", "memory"); \
 	    else if (sizeof (*(mem)) == 4) \
 	      __asm __volatile ("\
-		.align 2\n\
-		mova 1f,r0\n\
-		mov r15,r1\n\
-		mov #-6,r15\n\
+		mova 1f,r0\n\
+		mov r15,r1\n\
+		.align 2\n\
+		mov #(0f-1f),r15\n\
 	     0: mov.l @%1,r2\n\
-		add r2,%0\n\
-		mov.l %0,@%1\n\
+		add %0,r2\n\
+		mov.l r2,@%1\n\
 	     1: mov r1,r15"\
 		: "=&r" (__tmp) : rNOSP (mem), "0" (__value) \
 		: "r0", "r1", "r2", "memory"); \
@@ -233,43 +234,43 @@
      __typeof (*(mem)) __tmp, __value = (value); \
      if (sizeof (*(mem)) == 1) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  mov r15,r1\n\
+	  .align 2\n\
+	  mov #(0f-1f),r15\n\
        0: mov.b @%2,r2\n\
-	  add r2,%1\n\
-	  mov.b %1,@%2\n\
-       1: mov r1,r15\n\
-	  shal %1\n\
+	  add %1,r2\n\
+	  mov.b r2,@%2\n\
+       1: mov r1,r15\n\
+	  shal r2\n\
 	  movt %0"\
 	: "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
 	: "r0", "r1", "r2", "t", "memory"); \
      else if (sizeof (*(mem)) == 2) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  mov r15,r1\n\
+	  .align 2\n\
+	  mov #(0f-1f),r15\n\
        0: mov.w @%2,r2\n\
-	  add r2,%1\n\
-	  mov.w %1,@%2\n\
-       1: mov r1,r15\n\
-	  shal %1\n\
+	  add %1,r2\n\
+	  mov.w r2,@%2\n\
+       1: mov r1,r15\n\
+	  shal r2\n\
 	  movt %0"\
 	: "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
 	: "r0", "r1", "r2", "t", "memory"); \
      else if (sizeof (*(mem)) == 4) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  mov r15,r1\n\
+	  .align 2\n\
+	  mov #(0f-1f),r15\n\
        0: mov.l @%2,r2\n\
-	  add r2,%1\n\
-	  mov.l %1,@%2\n\
-       1: mov r1,r15\n\
-	  shal %1\n\
+	  add %1,r2\n\
+	  mov.l r2,@%2\n\
+       1: mov r1,r15\n\
+	  shal r2\n\
 	  movt %0"\
 	: "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
 	: "r0", "r1", "r2", "t", "memory"); \
@@ -282,43 +283,43 @@
      __typeof (*(mem)) __tmp, __value = (value); \
      if (sizeof (*(mem)) == 1) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  mov r15,r1\n\
+	  .align 2\n\
+	  mov #(0f-1f),r15\n\
        0: mov.b @%2,r2\n\
-	  add r2,%1\n\
-	  mov.b %1,@%2\n\
-       1: mov r1,r15\n\
-	  tst %1,%1\n\
+	  add %1,r2\n\
+	  mov.b r2,@%2\n\
+       1: mov r1,r15\n\
+	  tst r2,r2\n\
 	  movt %0"\
 	: "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
 	: "r0", "r1", "r2", "t", "memory"); \
      else if (sizeof (*(mem)) == 2) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  mov r15,r1\n\
+	  .align 2\n\
+	  mov #(0f-1f),r15\n\
        0: mov.w @%2,r2\n\
-	  add r2,%1\n\
-	  mov.w %1,@%2\n\
-       1: mov r1,r15\n\
-	  tst %1,%1\n\
+	  add %1,r2\n\
+	  mov.w r2,@%2\n\
+       1: mov r1,r15\n\
+	  tst r2,r2\n\
 	  movt %0"\
 	: "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
 	: "r0", "r1", "r2", "t", "memory"); \
      else if (sizeof (*(mem)) == 4) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  mov r15,r1\n\
-	  mov #-6,r15\n\
+	  mova 1f,r0\n\
+	  mov r15,r1\n\
+	  .align 2\n\
+	  mov #(0f-1f),r15\n\
        0: mov.l @%2,r2\n\
-	  add r2,%1\n\
-	  mov.l %1,@%2\n\
-       1: mov r1,r15\n\
-	  tst %1,%1\n\
+	  add %1,r2\n\
+	  mov.l r2,@%2\n\
+       1: mov r1,r15\n\
+	  tst r2,r2\n\
 	  movt %0"\
 	: "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
 	: "r0", "r1", "r2", "t", "memory"); \
@@ -333,10 +334,10 @@
   (void) ({ unsigned int __mask = 1 << (bit); \
 	    if (sizeof (*(mem)) == 1) \
 	      __asm __volatile ("\
-		.align 2\n\
-		mova 1f,r0\n\
-		mov r15,r1\n\
-		mov #-6,r15\n\
+		mova 1f,r0\n\
+		mov r15,r1\n\
+		.align 2\n\
+		mov #(0f-1f),r15\n\
 	     0: mov.b @%0,r2\n\
 		or %1,r2\n\
 		mov.b r2,@%0\n\
@@ -345,10 +346,10 @@
 		: "r0", "r1", "r2", "memory"); \
 	    else if (sizeof (*(mem)) == 2) \
 	      __asm __volatile ("\
-		.align 2\n\
-		mova 1f,r0\n\
-		mov r15,r1\n\
-		mov #-6,r15\n\
+		mova 1f,r0\n\
+		mov r15,r1\n\
+		.align 2\n\
+		mov #(0f-1f),r15\n\
 	     0: mov.w @%0,r2\n\
 		or %1,r2\n\
 		mov.w r2,@%0\n\
@@ -357,10 +358,10 @@
 		: "r0", "r1", "r2", "memory"); \
 	    else if (sizeof (*(mem)) == 4) \
 	      __asm __volatile ("\
-		.align 2\n\
-		mova 1f,r0\n\
-		mov r15,r1\n\
-		mov #-6,r15\n\
+		mova 1f,r0\n\
+		mov r15,r1\n\
+		.align 2\n\
+		mov #(0f-1f),r15\n\
 	     0: mov.l @%0,r2\n\
 		or %1,r2\n\
 		mov.l r2,@%0\n\
@@ -376,49 +377,49 @@
      unsigned int __result = __mask; \
      if (sizeof (*(mem)) == 1) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  nop\n\
-	  mov r15,r1\n\
-	  mov #-8,r15\n\
+	  mova 1f,r0\n\
+	  .align 2\n\
+	  mov r15,r1\n\
+	  mov #(0f-1f),r15\n\
        0: mov.b @%2,r2\n\
-	  or r2,%1\n\
-	  and r2,%0\n\
-	  mov.b %1,@%2\n\
-       1: mov r1,r15"\
+	  mov r2,r3\n\
+	  or %1,r2\n\
+	  mov.b r2,@%2\n\
+       1: mov r1,r15\n\
+	  and r3,%0"\
 	: "=&r" (__result), "=&r" (__mask) \
 	: rNOSP (mem), "0" (__result), "1" (__mask) \
-	: "r0", "r1", "r2", "memory"); \
+	: "r0", "r1", "r2", "r3", "memory");	\
      else if (sizeof (*(mem)) == 2) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  nop\n\
-	  mov r15,r1\n\
-	  mov #-8,r15\n\
+	  mova 1f,r0\n\
+	  .align 2\n\
+	  mov r15,r1\n\
+	  mov #(0f-1f),r15\n\
        0: mov.w @%2,r2\n\
-	  or r2,%1\n\
-	  and r2,%0\n\
+	  mov r2,r3\n\
+	  or %1,r2\n\
 	  mov.w %1,@%2\n\
-       1: mov r1,r15"\
+       1: mov r1,r15\n\
+	  and r3,%0"\
 	: "=&r" (__result), "=&r" (__mask) \
 	: rNOSP (mem), "0" (__result), "1" (__mask) \
-	: "r0", "r1", "r2", "memory"); \
+	: "r0", "r1", "r2", "r3", "memory"); \
      else if (sizeof (*(mem)) == 4) \
        __asm __volatile ("\
-	  .align 2\n\
-	  mova 1f,r0\n\
-	  nop\n\
-	  mov r15,r1\n\
-	  mov #-8,r15\n\
+	  mova 1f,r0\n\
+	  .align 2\n\
+	  mov r15,r1\n\
+	  mov #(0f-1f),r15\n\
        0: mov.l @%2,r2\n\
+	  mov r2,r3\n\
 	  or r2,%1\n\
-	  and r2,%0\n\
 	  mov.l %1,@%2\n\
-       1: mov r1,r15"\
+       1: mov r1,r15\n\
+	  and r3,%0"\
 	: "=&r" (__result), "=&r" (__mask) \
 	: rNOSP (mem), "0" (__result), "1" (__mask) \
-	: "r0", "r1", "r2", "memory"); \
+	: "r0", "r1", "r2", "r3", "memory"); \
      else \
        abort (); \
      __result; })

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/makecontext.S
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/makecontext.S (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/makecontext.S Mon Jun 25 21:30:45 2012
@@ -1,5 +1,5 @@
 /* Create new context.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005-2012 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
@@ -17,6 +17,7 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <sysdep.h>
+#include <abort-instr.h>
 
 #include "ucontext_i.h"
 
@@ -33,44 +34,44 @@
 	.align	5
 ENTRY(__makecontext)
 	mov	#4, r3
-	mov.l	@(oSS_SP,r4), r1
-	mov.l	@(oSS_SIZE,r4), r2
-	add	r1, r2
-	cmp/gt	r6, r3
+	mov.l	@(oSS_SP,r4), r1	/* r1 <- ucb->stack_base */
+	mov.l	@(oSS_SIZE,r4), r2	/* r2 <- ucb->stack_size */
+	add	r1, r2			/* r2 <- stack_top */
+	cmp/gt	r3, r6			/* argc > 4? */
 	bf/s	1f
-	 shlr2	r2
+	 shlr2	r2			/* r2 <- stack_top / 4 */
 	sub	r6, r2
 	add	r3, r2
 1:
-	shll2	r2
+	shll2	r2		/* r2 <- stack_top - ((argc > 4) ? 4 * (argc - 4) : 0 */
 	mov	#oR15, r0
 	mov.l	@(oLINK,r4), r1
-	mov.l	r2, @(r0,r4)
-	mov.l	r1, @(oR8,r4)
+	mov.l	r2, @(r0,r4)	/* ucp->r15 <- r2 */
+	mov.l	r1, @(oR8,r4)	/* ucp->r8 <- ucp->uc_link */
 	mov	#oPC, r0
-	mov.l	r5, @(r0,r4)
+	mov.l	r5, @(r0,r4)	/* ucp->PC <- func */
 
-	cmp/pl	r6
+	cmp/pl	r6		/* argc > 0? */
 	bf/s	.L1
 	 dt	r6
-	mov.l	r7, @(oR4,r4)
-	cmp/pl	r6
+	mov.l	r7, @(oR4,r4)	/* ucp->r4 <- argv[0] */
+	cmp/pl	r6		/* argc > 1? */
 	bf/s	.L1
 	 dt	r6
 	mov.l	@(0,r15), r1
-	mov.l	r1, @(oR5,r4)
-	cmp/pl	r6
+	mov.l	r1, @(oR5,r4)	/* ucp->r5 <- argv[1] */
+	cmp/pl	r6		/* argc > 2? */
 	bf/s	.L1
 	 dt	r6
 	mov.l	@(4,r15), r1
-	mov.l	r1, @(oR6,r4)
-	cmp/pl	r6
+	mov.l	r1, @(oR6,r4)	/* ucp->r6 <- argv[2] */
+	cmp/pl	r6		/* argc > 3? */
 	bf/s	.L1
 	 dt	r6
 	mov.l	@(8,r15), r1
-	mov.l	r1, @(oR7,r4)
+	mov.l	r1, @(oR7,r4)	/* ucp->r7 <- argv[3] */
 	mov	#12,r0
-.L0:
+.L0:				/* Save remaining argv[] on the stack.  */
 	cmp/pl	r6
 	bf/s	.L1
 	 dt	r6
@@ -87,7 +88,7 @@
 #endif
 	add	#oPR, r4
 	rts
-	 mov.l	r0, @r4
+	 mov.l	r0, @r4		/* ucp->pr <- exitcode */
 #ifndef PIC
 	.align	2
 .L2:
@@ -96,49 +97,63 @@
 	cfi_endproc
 
 	.align	5
+	cfi_startproc
 .Lexitcode:
-	tst	r8, r8
-	bt/s	2f
-	 mov	r8, r4
 #ifdef PIC
+	mov.l	r12, @-r15
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r12, 0)
 	mova	.Lgot, r0
 	mov.l	.Lgot, r12
 	add	r0, r12
-	mov.l	.L3, r1
+#endif
+	tst	r8, r8		/* ucb->uc_link == NULL? */
+	bt/s	2f
+	 mov	r8, r4		/* r4 <- ucb->uc_link */
+	mov.l	.Lsetcontext, r1
+	sts.l	pr, @-r15
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (pr, 0)
+#ifdef PIC
 	bsrf	r1
 .LPCS0:
 	 nop
 #else
-	mov.l	.L3, r1
 	jsr	@r1
 	 nop
 #endif
+        /* Restore to keep CFI/CFA balanced.  */
+	lds.l	@r15+, pr
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (pr)
+	/* If this returns (which can happen if the syscall fails) we'll exit
+	   the program with the return error value (-1).  */
+
 2:
-	mov.l	.L4, r1
+	mov.l	.Lexit, r1
 #ifdef PIC
 	add	r12, r1
 #endif
 	jsr	@r1
 	 mov	r0, r4
-0:
-	bra	0b
-	 nop
+	/* The 'exit' call should never return.  In case it does cause the
+	   process to terminate.  */
+	ABORT_INSTRUCTION_ASM
 
 	.align	2
 #ifdef PIC
 .Lgot:
 	.long	_GLOBAL_OFFSET_TABLE_
-.L3:
+.Lsetcontext:
 	.long	__setcontext@PLT-(.LPCS0+2-(.))
-.L4:
+.Lexit:
 	.long	HIDDEN_JUMPTARGET(exit)@GOTOFF
 #else
-.L3:
+.Lsetcontext:
 	.long	__setcontext
-.L4:
+.Lexit:
 	.long	HIDDEN_JUMPTARGET(exit)
 #endif
-	cfi_startproc
 PSEUDO_END(__makecontext)
 
 weak_alias (__makecontext, makecontext)

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/nptl/libc.abilist Mon Jun 25 21:30:45 2012
@@ -79,6 +79,7 @@
  aligned_alloc F
  c16rtomb F
  c32rtomb F
+ fanotify_mark F
  getauxval F
  mbrtoc16 F
  mbrtoc32 F

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/syscalls.list
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/syscalls.list (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/syscalls.list Mon Jun 25 21:30:45 2012
@@ -3,3 +3,5 @@
 waitpid		-	waitpid		Ci:ipi	__waitpid	waitpid	__libc_waitpid
 
 prlimit64	EXTRA	prlimit64	i:iipp	prlimit64
+
+fanotify_mark	EXTRA	fanotify_mark	i:iiiiis	__fanotify_mark	fanotify_mark@@GLIBC_2.16

Modified: trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h
==============================================================================
--- trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h (original)
+++ trunk/libc/sysdeps/unix/sysv/linux/sh/sysdep.h Mon Jun 25 21:30:45 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 1992,1993,1995-2000,2002-2006,2009,2011
-	Free Software Foundation, Inc.
+/* Copyright (C) 1992-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@xxxxxxxxxxxxxx>, August 1995.
    Changed by Kaz Kojima, <kkojima@xxxxxxxxxxxxxx>.
@@ -100,11 +99,15 @@
 # if RTLD_PRIVATE_ERRNO
 #  define SYSCALL_ERROR_HANDLER	\
 	neg r0,r1; \
+	mov r12,r2; \
+	cfi_register (r12, r2); \
 	mov.l 0f,r12; \
 	mova 0f,r0; \
 	add r0,r12; \
 	mov.l 1f,r0; \
 	mov.l r1,@(r0,r12); \
+	mov r2,r12; \
+	cfi_restore (r12); \
 	bra .Lpseudo_end; \
 	 mov _IMM1,r0; \
 	.align 2; \
@@ -121,6 +124,7 @@
 #  define SYSCALL_ERROR_HANDLER \
 	neg r0,r1; \
 	mov r12,r2; \
+	cfi_register (r12, r2); \
 	mov.l 0f,r12; \
 	mova 0f,r0; \
 	add r0,r12; \
@@ -128,6 +132,7 @@
 	stc gbr, r4; \
 	mov.l @(r0,r12),r0; \
 	mov r2,r12; \
+	cfi_restore (r12); \
 	add r4,r0; \
 	mov.l r1,@r0; \
 	bra .Lpseudo_end; \
@@ -140,12 +145,14 @@
 #  define SYSCALL_ERROR_HANDLER						      \
 	neg r0,r1; \
 	mov r12,r2; \
+	cfi_register (r12, r2); \
 	mov.l 0f,r12; \
 	mova 0f,r0; \
 	add r0,r12; \
 	mov.l 1f,r0; \
 	mov.l @(r0,r12),r0; \
 	mov r2,r12; \
+	cfi_restore (r12); \
 	mov.l r1,@r0; \
 	bra .Lpseudo_end; \
 	 mov _IMM1,r0; \

Propchange: trunk/ports/sysdeps/arm/bits/predefs.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jun 25 21:30:45 2012
@@ -1,2 +1,2 @@
-/fsf/trunk/ports/sysdeps/arm/bits/predefs.h:18166-19234
+/fsf/trunk/ports/sysdeps/arm/bits/predefs.h:18166-19292
 /fsf/trunk/ports/sysdeps/arm/eabi/bits/predefs.h:15224-17813

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