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

[commits] r10111 - in /fsf/trunk/ports: ./ sysdeps/alpha/bits/ sysdeps/alpha/elf/ sysdeps/alpha/fpu/ sysdeps/arm/ sysdeps/arm/eabi/ sy...



Author: eglibc
Date: Fri Mar 26 13:47:59 2010
New Revision: 10111

Log:
Import glibc-ports-mainline for 2010-03-26

Added:
    fsf/trunk/ports/sysdeps/arm/configure
    fsf/trunk/ports/sysdeps/arm/configure.in
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/creat.c
Modified:
    fsf/trunk/ports/ChangeLog.alpha
    fsf/trunk/ports/ChangeLog.arm
    fsf/trunk/ports/sysdeps/alpha/bits/atomic.h
    fsf/trunk/ports/sysdeps/alpha/elf/configure
    fsf/trunk/ports/sysdeps/alpha/elf/configure.in
    fsf/trunk/ports/sysdeps/alpha/fpu/fegetenv.c
    fsf/trunk/ports/sysdeps/arm/dl-trampoline.S
    fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S
    fsf/trunk/ports/sysdeps/arm/eabi/arm-mcount.S
    fsf/trunk/ports/sysdeps/arm/memcpy.S
    fsf/trunk/ports/sysdeps/arm/memmove.S
    fsf/trunk/ports/sysdeps/arm/sysdep.h
    fsf/trunk/ports/sysdeps/unix/alpha/sysdep.h
    fsf/trunk/ports/sysdeps/unix/arm/sysdep.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/Versions
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-auxv.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
    fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sys/user.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/syscall.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/mmap.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
    fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h

Modified: fsf/trunk/ports/ChangeLog.alpha
==============================================================================
--- fsf/trunk/ports/ChangeLog.alpha (original)
+++ fsf/trunk/ports/ChangeLog.alpha Fri Mar 26 13:47:59 2010
@@ -1,3 +1,62 @@
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S: New.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/alpha/Versions: Update errlist-compat
+	for GLIBC_2.12.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/alpha/fpu/fegetenv.c: Add hidden alias.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/alpha/dl-auxv.h (__libc_alpha_cache_shape):
+	Define extern here; move definition...
+	* sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: ... here.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/alpha/sys/user.h: Don't include asm/page.h.
+	(PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Define.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN_EX,
+	F_GETOWN_EX, F_OWNER_TID, F_OWNER_PID, F_OWNER_PGRP,
+	F_OWNER_GID, struct f_owner_ex): Define.
+	(F_SETOWN, F_GETOWN): Define with XPG7.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/unix/alpha/sysdep.h (PTR_MANGLE): Define for !PIC too.
+	(PTR_DEMANGLE): Likewise.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P,
+	INTERNAL_SYSCALL_ERRNO): "Use" the "other" variable in each macro.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdep/unix/sysv/linux/alpha/creat.c: New.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdep/alpha/elf/configure.in (libc_cv_alpha_hidden_gprel)
+	Adjust the test for gcc 4.5.
+	* sysdep/alpha/elf/configure: Rebuild.
+
+2010-03-26  Richard Henderson  <rth@xxxxxxxxxx>
+
+	* sysdeps/alpha/bits/atomic.h (__arch_exchange_8_int,
+	__arch_exchange_16_int, __arch_exchange_32_int,
+	__arch_exchange_64_int, __arch_exchange_and_add_32_int,
+	__arch_exchange_and_add_64_int): Use __typeof to get the
+	return type correct without warning.
+
 2010-03-23  Matt Turner  <mattst88@xxxxxxxxx>
             Aurelien Jarno  <aurelien@xxxxxxxxxxx>
 

Modified: fsf/trunk/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/ports/ChangeLog.arm (original)
+++ fsf/trunk/ports/ChangeLog.arm Fri Mar 26 13:47:59 2010
@@ -1,3 +1,53 @@
+2010-03-26  Thomas Schwinge  <thomas@xxxxxxxxxxxxxxxx>
+
+	* sysdeps/arm/configure.in: New file.
+	* sysdeps/arm/configure: Generate.
+	* sysdeps/arm/sysdep.h (ENTRY, END): Add CFI statements.
+	* sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
+	(PSEUDO, DOCARGS_0, RESTORE_LR_0, DOCARGS_1, UNDOCARGS_1, DOCARGS_2)
+	(UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3, DOCARGS_4, UNDOCARGS_4)
+	(DOCARGS_5, UNDOCARGS_5, RESTORE_LR_5, DOCARGS_6, UNDOCARGS_6):
+	Likewise.
+	[__ASSEMBLER__] (SINGLE_THREAD_P): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (DO_CALL): Likewise.
+	* sysdeps/unix/sysv/linux/arm/sysdep.h
+	(POP_PC, SYSCALL_ERROR_HANDLER (__local_syscall_error))
+	(DOARGS_5, UNDOARGS_5, DOARGS_6, UNDOARGS_6, DOARGS_7, UNDOARGS_7):
+	Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+	(__default_sa_restorer_v1, __default_sa_restorer_v2)
+	(__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add END
+	statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/syscall.S (syscall): Add CFI
+	statements.
+	* sysdeps/arm/memcpy.S (memcpy): Add CFI statements.
+	* sysdeps/arm/memmove.S (memmove): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/mmap64.S (__mmap64): Add CFI
+	statements.
+	* sysdeps/unix/sysv/linux/arm/mmap.S (__mmap): Likewise.
+	* sysdeps/arm/eabi/arm-mcount.S (__gnu_mcount_nc, _mcount): Add CFI
+	statements.
+	* sysdeps/arm/sysdep.h (CALL_MCOUNT): Likewise.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
+	(_Unwind_Resume): Add CFI statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
+	(_Unwind_Resume): Likewise.
+	* sysdeps/arm/dl-trampoline.S (_dl_runtime_resolve)
+	(_dl_runtime_profile) <CFI>: Only emit .debug_frame.
+	* sysdeps/arm/eabi/__longjmp.S (__longjmp): Add CFI statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S (CALL_FAIL)
+	(CHECK_SP): Likewise
+	* sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Add CFI
+	statements.
+	* sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise.
+	* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Add CFI statements.
+	* sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (cfi_startproc):
+	Redefine for signal frames.
+	(__default_sa_restorer_v1, __default_sa_restorer_v2)
+	(__default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2): Add CFI
+	statements.
+
 2010-02-10  Joseph Myers  <joseph@xxxxxxxxxxxxxxxx>
 
 	* sysdeps/arm/eabi/fegetenv.c, sysdeps/arm/fpu/fegetenv.c: Add

Modified: fsf/trunk/ports/sysdeps/alpha/bits/atomic.h
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/bits/atomic.h (original)
+++ fsf/trunk/ports/sysdeps/alpha/bits/atomic.h Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2010 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
@@ -221,7 +221,7 @@
 
 #define __arch_exchange_8_int(mem, value, mb1, mb2)			\
 ({									\
-  unsigned long __ret, __tmp, __addr64, __sval;				\
+  unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret;		\
   __asm__ __volatile__ (						\
 		mb1							\
 	"	andnot	%[__addr8],7,%[__addr64]\n"			\
@@ -244,7 +244,7 @@
 
 #define __arch_exchange_16_int(mem, value, mb1, mb2)			\
 ({									\
-  unsigned long __ret, __tmp, __addr64, __sval;				\
+  unsigned long __tmp, __addr64, __sval; __typeof(*mem) __ret;		\
   __asm__ __volatile__ (						\
 		mb1							\
 	"	andnot	%[__addr16],7,%[__addr64]\n"			\
@@ -267,7 +267,7 @@
 
 #define __arch_exchange_32_int(mem, value, mb1, mb2)			\
 ({									\
-  signed int __ret, __tmp;						\
+  signed int __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldl_l	%[__ret],%[__mem]\n"				\
@@ -284,7 +284,7 @@
 
 #define __arch_exchange_64_int(mem, value, mb1, mb2)			\
 ({									\
-  unsigned long __ret, __tmp;						\
+  unsigned long __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldq_l	%[__ret],%[__mem]\n"				\
@@ -316,7 +316,7 @@
 
 #define __arch_exchange_and_add_32_int(mem, value, mb1, mb2)		\
 ({									\
-  signed int __ret, __tmp;						\
+  signed int __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldl_l	%[__ret],%[__mem]\n"				\
@@ -333,7 +333,7 @@
 
 #define __arch_exchange_and_add_64_int(mem, value, mb1, mb2)		\
 ({									\
-  unsigned long __ret, __tmp;						\
+  unsigned long __tmp; __typeof(*mem) __ret;				\
   __asm__ __volatile__ (						\
 		mb1							\
 	"1:	ldq_l	%[__ret],%[__mem]\n"				\

Modified: fsf/trunk/ports/sysdeps/alpha/elf/configure
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/elf/configure (original)
+++ fsf/trunk/ports/sysdeps/alpha/elf/configure Fri Mar 26 13:47:59 2010
@@ -4,10 +4,10 @@
 if test "$usetls" != no; then
 # Check for support of thread-local storage handling in assembler and
 # linker.
-echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
-echo $ECHO_N "checking for Alpha TLS support... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for Alpha TLS support" >&5
+$as_echo_n "checking for Alpha TLS support... " >&6; }
 if test "${libc_cv_alpha_tls+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat > conftest.s <<\EOF
 	.section ".tdata", "awT", @progbits
@@ -47,7 +47,7 @@
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   libc_cv_alpha_tls=yes
 else
@@ -55,8 +55,8 @@
 fi
 rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
-echo "${ECHO_T}$libc_cv_alpha_tls" >&6
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_tls" >&5
+$as_echo "$libc_cv_alpha_tls" >&6; }
 if test $libc_cv_alpha_tls = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define HAVE_TLS_SUPPORT 1
@@ -65,19 +65,15 @@
 fi
 fi
 
-echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
-echo $ECHO_N "checking for GP relative module local relocs... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for GP relative module local relocs" >&5
+$as_echo_n "checking for GP relative module local relocs... " >&6; }
 if test "${libc_cv_alpha_hidden_gprel+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat > conftest.c <<\EOF
-static int bar;
+static volatile int bar;
 int baz __attribute__((visibility("hidden")));
-
-int foo (void)
-{
-  return bar + baz;
-}
+int f(void) { return bar + baz; }
 EOF
 
 libc_cv_alpha_hidden_gprel=no
@@ -85,7 +81,7 @@
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   if grep -q 'bar.*!gprel' conftest.s \
      && grep -q 'baz.*!gprel' conftest.s \
@@ -96,8 +92,8 @@
 fi
 rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
-echo "${ECHO_T}$libc_cv_alpha_hidden_gprel" >&6
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_alpha_hidden_gprel" >&5
+$as_echo "$libc_cv_alpha_hidden_gprel" >&6; }
 if test $libc_cv_alpha_hidden_gprel = yes; then
   cat >>confdefs.h <<\_ACEOF
 #define PI_STATIC_AND_HIDDEN 1

Modified: fsf/trunk/ports/sysdeps/alpha/elf/configure.in
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/elf/configure.in (original)
+++ fsf/trunk/ports/sysdeps/alpha/elf/configure.in Fri Mar 26 13:47:59 2010
@@ -53,13 +53,9 @@
 
 AC_CACHE_CHECK(for GP relative module local relocs, libc_cv_alpha_hidden_gprel, [dnl
 cat > conftest.c <<\EOF
-static int bar;
+static volatile int bar;
 int baz __attribute__((visibility("hidden")));
-
-int foo (void)
-{
-  return bar + baz;
-}
+int f(void) { return bar + baz; }
 EOF
 dnl
 

Modified: fsf/trunk/ports/sysdeps/alpha/fpu/fegetenv.c
==============================================================================
--- fsf/trunk/ports/sysdeps/alpha/fpu/fegetenv.c (original)
+++ fsf/trunk/ports/sysdeps/alpha/fpu/fegetenv.c Fri Mar 26 13:47:59 2010
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+   Copyright (C) 1997,99,2000,2001,2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@xxxxxxxx>, 1997
 
@@ -45,3 +45,4 @@
 #endif
 
 versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2);
+libm_hidden_ver(__fegetenv, fegetenv)

Added: fsf/trunk/ports/sysdeps/arm/configure
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/configure (added)
+++ fsf/trunk/ports/sysdeps/arm/configure Fri Mar 26 13:47:59 2010
@@ -1,0 +1,33 @@
+# This file is generated from configure.in by Autoconf.  DO NOT EDIT!
+ # Local configure fragment for sysdeps/arm.
+
+{ $as_echo "$as_me:$LINENO: checking whether the CFI directive .cfi_sections is supported" >&5
+$as_echo_n "checking whether the CFI directive .cfi_sections is supported... " >&6; }
+if test "${libc_cv_asm_cfi_directive_sections+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.s <<EOF
+	.text
+	.cfi_sections .debug_frame, .eh_frame
+	.cfi_startproc
+	.cfi_endproc
+EOF
+  if { ac_try='${CC-cc} $ASFLAGS -c conftest.s 1>&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    libc_cv_asm_cfi_directive_sections=yes
+  else
+    libc_cv_asm_cfi_directive_sections=no
+  fi
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:$LINENO: result: $libc_cv_asm_cfi_directive_sections" >&5
+$as_echo "$libc_cv_asm_cfi_directive_sections" >&6; }
+if test $libc_cv_asm_cfi_directive_sections != yes; then
+  { { $as_echo "$as_me:$LINENO: error: need .cfi_sections in this configuration" >&5
+$as_echo "$as_me: error: need .cfi_sections in this configuration" >&2;}
+   { (exit 1); exit 1; }; }
+fi

Added: fsf/trunk/ports/sysdeps/arm/configure.in
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/configure.in (added)
+++ fsf/trunk/ports/sysdeps/arm/configure.in Fri Mar 26 13:47:59 2010
@@ -1,0 +1,20 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/arm.
+
+AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported],
+  [libc_cv_asm_cfi_directive_sections],
+  [cat > conftest.s <<EOF
+	.text
+	.cfi_sections .debug_frame, .eh_frame
+	.cfi_startproc
+	.cfi_endproc
+EOF
+  if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
+    libc_cv_asm_cfi_directive_sections=yes
+  else
+    libc_cv_asm_cfi_directive_sections=no
+  fi
+  rm -f conftest*])
+if test $libc_cv_asm_cfi_directive_sections != yes; then
+  AC_MSG_ERROR([need .cfi_sections in this configuration])
+fi

Modified: fsf/trunk/ports/sysdeps/arm/dl-trampoline.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/dl-trampoline.S (original)
+++ fsf/trunk/ports/sysdeps/arm/dl-trampoline.S Fri Mar 26 13:47:59 2010
@@ -1,5 +1,5 @@
 /* PLT trampolines.  ARM version.
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2010 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
@@ -29,6 +29,7 @@
 	.text
 	.globl _dl_runtime_resolve
 	.type _dl_runtime_resolve, #function
+	.cfi_sections .debug_frame
 	cfi_startproc
 	.align 2
 _dl_runtime_resolve:
@@ -77,6 +78,7 @@
 #ifndef PROF
 	.globl _dl_runtime_profile
 	.type _dl_runtime_profile, #function
+	.cfi_sections .debug_frame
 	cfi_startproc
 	.align 2
 _dl_runtime_profile:

Modified: fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S (original)
+++ fsf/trunk/ports/sysdeps/arm/eabi/__longjmp.S Fri Mar 26 13:47:59 2010
@@ -1,5 +1,6 @@
 /* longjmp for ARM.
-   Copyright (C) 1997, 1998, 2005, 2006, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2005, 2006, 2009, 2010
+     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
@@ -31,10 +32,21 @@
 	moveq	r0, #1		/* can't let setjmp() return zero! */
 
 #ifdef CHECK_SP
-	ldr	r4, [ip, #32]
+	ldr	r4, [ip, #32]	/* jmpbuf's sp */
+	cfi_undefined (r4)
 	CHECK_SP (r4)
 #endif
 	LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
+	cfi_restore (v1)
+	cfi_restore (v2)
+	cfi_restore (v3)
+	cfi_restore (v4)
+	cfi_restore (v5)
+	cfi_restore (v6)
+	cfi_restore (sl)
+	cfi_restore (fp)
+	cfi_restore (sp)
+	cfi_restore (lr)
 
 #ifdef IS_IN_rtld
   	ldr	a2, 1f

Modified: fsf/trunk/ports/sysdeps/arm/eabi/arm-mcount.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/eabi/arm-mcount.S (original)
+++ fsf/trunk/ports/sysdeps/arm/eabi/arm-mcount.S Fri Mar 26 13:47:59 2010
@@ -1,5 +1,5 @@
 /* Implementation of profiling support.  ARM EABI version.
-   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009, 2010 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
@@ -46,10 +46,22 @@
 
 ENTRY(__gnu_mcount_nc)
 	push {r0, r1, r2, r3, lr}
+	cfi_adjust_cfa_offset (20)
+	cfi_rel_offset (r0, 0)
+	cfi_rel_offset (r1, 4)
+	cfi_rel_offset (r2, 8)
+	cfi_rel_offset (r3, 12)
+	cfi_rel_offset (lr, 16)
 	bic r1, lr, #1
 	ldr r0, [sp, #20]
 	bl __mcount_internal
 	pop {r0, r1, r2, r3, ip, lr}
+	cfi_adjust_cfa_offset (-24)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r2)
+	cfi_restore (r3)
+	cfi_register (lr, ip)
 	bx ip
 END(__gnu_mcount_nc)
 
@@ -59,6 +71,13 @@
 
 ENTRY(_mcount)
 	stmdb sp!, {r0, r1, r2, r3, fp, lr}
+	cfi_adjust_cfa_offset (24)
+	cfi_rel_offset (r0, 0)
+	cfi_rel_offset (r1, 4)
+	cfi_rel_offset (r2, 8)
+	cfi_rel_offset (r3, 12)
+	cfi_rel_offset (fp, 16)
+	cfi_rel_offset (lr, 20)
 #ifdef __thumb2__
 	movs r0, fp
 	ittt ne
@@ -73,6 +92,13 @@
 	ldmia sp!, {r0, r1, r2, r3, fp, pc}
 #else
 	ldmia sp!, {r0, r1, r2, r3, fp, lr}
+	cfi_adjust_cfa_offset (-24)
+	cfi_restore (r0)
+	cfi_restore (r1)
+	cfi_restore (r2)
+	cfi_restore (r3)
+	cfi_restore (fp)
+	cfi_restore (lr)
 	bx lr
 #endif
 END(_mcount)

Modified: fsf/trunk/ports/sysdeps/arm/memcpy.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/memcpy.S (original)
+++ fsf/trunk/ports/sysdeps/arm/memcpy.S Fri Mar 26 13:47:59 2010
@@ -58,6 +58,11 @@
 ENTRY(memcpy)
 
 		stmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (12)
+		cfi_rel_offset (r4, 4)
+		cfi_rel_offset (lr, 8)
+
+		cfi_remember_state
 
 		subs	r2, r2, #4
 		blt	8f
@@ -69,6 +74,11 @@
 
 1:		subs	r2, r2, #(28)
 		stmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (16)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
 		blt	5f
 
 	CALGN(	ands	ip, r1, #31		)
@@ -121,6 +131,11 @@
 	CALGN(	bcs	2b			)
 
 7:		ldmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (-16)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
 
 8:		movs	r2, r2, lsl #31
 		ldrneb	r3, [r1], #1
@@ -132,10 +147,15 @@
 
 #if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
 		ldmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (-12)
+		cfi_restore (r4)
+		cfi_restore (lr)
 		bx      lr
 #else
 		ldmfd	sp!, {r0, r4, pc}
 #endif
+
+		cfi_restore_state
 
 9:		rsb	ip, ip, #4
 		cmp	ip, #2
@@ -169,6 +189,12 @@
 	CALGN(	bcc	15f			)
 
 11:		stmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (20)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
+		cfi_rel_offset (r9, 16)
 
 	PLD(	pld	[r1, #0]		)
 	PLD(	subs	r2, r2, #96		)
@@ -203,6 +229,12 @@
 	PLD(	bge	13b			)
 
 		ldmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (-20)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
+		cfi_restore (r9)
 
 14:		ands	ip, r2, #28
 		beq	16f

Modified: fsf/trunk/ports/sysdeps/arm/memmove.S
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/memmove.S (original)
+++ fsf/trunk/ports/sysdeps/arm/memmove.S Fri Mar 26 13:47:59 2010
@@ -73,6 +73,12 @@
 #endif
 
 		stmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (12)
+		cfi_rel_offset (r4, 4)
+		cfi_rel_offset (lr, 8)
+
+		cfi_remember_state
+
 		add	r1, r1, r2
 		add	r0, r0, r2
 		subs	r2, r2, #4
@@ -85,6 +91,11 @@
 
 1:		subs	r2, r2, #(28)
 		stmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (16)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
 		blt	5f
 
 	CALGN(	ands	ip, r1, #31		)
@@ -136,6 +147,11 @@
 	CALGN(	bcs	2b			)
 
 7:		ldmfd	sp!, {r5 - r8}
+		cfi_adjust_cfa_offset (-16)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
 
 8:		movs	r2, r2, lsl #31
 		ldrneb	r3, [r1, #-1]!
@@ -144,12 +160,18 @@
 		strneb	r3, [r0, #-1]!
 		strcsb	r4, [r0, #-1]!
 		strcsb	ip, [r0, #-1]
+
 #if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
 		ldmfd	sp!, {r0, r4, lr}
+		cfi_adjust_cfa_offset (-12)
+		cfi_restore (r4)
+		cfi_restore (lr)
 		bx      lr
 #else
 		ldmfd	sp!, {r0, r4, pc}
 #endif
+
+		cfi_restore_state
 
 9:		cmp	ip, #2
 		ldrgtb	r3, [r1, #-1]!
@@ -182,6 +204,12 @@
 	CALGN(	bcc	15f			)
 
 11:		stmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (20)
+		cfi_rel_offset (r5, 0)
+		cfi_rel_offset (r6, 4)
+		cfi_rel_offset (r7, 8)
+		cfi_rel_offset (r8, 12)
+		cfi_rel_offset (r9, 16)
 
 	PLD(	pld	[r1, #-4]		)
 	PLD(	subs	r2, r2, #96		)
@@ -216,6 +244,12 @@
 	PLD(	bge	13b			)
 
 		ldmfd	sp!, {r5 - r9}
+		cfi_adjust_cfa_offset (-20)
+		cfi_restore (r5)
+		cfi_restore (r6)
+		cfi_restore (r7)
+		cfi_restore (r8)
+		cfi_restore (r9)
 
 14:		ands	ip, r2, #28
 		beq	16f

Modified: fsf/trunk/ports/sysdeps/arm/sysdep.h
==============================================================================
--- fsf/trunk/ports/sysdeps/arm/sysdep.h (original)
+++ fsf/trunk/ports/sysdeps/arm/sysdep.h Fri Mar 26 13:47:59 2010
@@ -1,5 +1,5 @@
 /* Assembler macros for ARM.
-   Copyright (C) 1997, 1998, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2003, 2009, 2010 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
@@ -81,18 +81,25 @@
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function)			      \
   .align ALIGNARG(4);							      \
   C_LABEL(name)								      \
+  .cfi_sections .debug_frame;						      \
+  cfi_startproc;							      \
   CALL_MCOUNT
 
 #undef	END
 #define END(name)							      \
+  cfi_endproc;								      \
   ASM_SIZE_DIRECTIVE(name)
 
 /* If compiled for profiling, call `mcount' at the start of each function.  */
 #ifdef	PROF
-#define CALL_MCOUNT			\
-	str	lr,[sp, #-4]!	;	\
-	bl	PLTJMP(mcount)	;	\
-	ldr	lr, [sp], #4	;
+#define CALL_MCOUNT \
+  str	lr,[sp, #-4]!; \
+  cfi_adjust_cfa_offset (4); \
+  cfi_rel_offset (lr, 0); \
+  bl PLTJMP(mcount); \
+  ldr lr, [sp], #4; \
+  cfi_adjust_cfa_offset (-4); \
+  cfi_restore (lr)
 #else
 #define CALL_MCOUNT		/* Do nothing.  */
 #endif

Modified: fsf/trunk/ports/sysdeps/unix/alpha/sysdep.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/alpha/sysdep.h (original)
+++ fsf/trunk/ports/sysdeps/unix/alpha/sysdep.h Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006
+/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@xxxxxxx).
@@ -191,8 +191,10 @@
 })
 
 #define INTERNAL_SYSCALL_DECL(err)		long int err
-#define INTERNAL_SYSCALL_ERROR_P(val, err)	err
-#define INTERNAL_SYSCALL_ERRNO(val, err)	val
+/* Make sure and "use" the variable that we're not returning,
+   in order to suppress unused variable warnings.  */
+#define INTERNAL_SYSCALL_ERROR_P(val, err)	((void)val, err)
+#define INTERNAL_SYSCALL_ERRNO(val, err)	((void)err, val)
 
 #define inline_syscall_clobbers				\
 	"$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8",	\
@@ -428,11 +430,21 @@
 #  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
 #  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
 # else
-extern uintptr_t __pointer_chk_guard attribute_relro;
+extern const uintptr_t __pointer_chk_guard attribute_relro;
 #  define PTR_MANGLE(var)	\
-	(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+	(var) = (__typeof(var)) ((uintptr_t) (var) ^ __pointer_chk_guard)
 #  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
 # endif
+#else
+/* There exists generic C code that assumes that PTR_MANGLE is always
+   defined.  When generating code for the static libc, we don't have
+   __pointer_chk_guard defined.  Nor is there any place that would
+   initialize it if it were defined, so there's little point in doing
+   anything more than nothing.  */
+# ifndef __ASSEMBLER__
+#  define PTR_MANGLE(var)
+#  define PTR_DEMANGLE(var)
+# endif
 #endif
 
 #endif /* ASSEMBLER */

Modified: fsf/trunk/ports/sysdeps/unix/arm/sysdep.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/arm/sysdep.S (original)
+++ fsf/trunk/ports/sysdeps/unix/arm/sysdep.S Fri Mar 26 13:47:59 2010
@@ -1,5 +1,5 @@
 /* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2002, 2003,
-   2004, 2005
+   2004, 2005, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -44,6 +44,7 @@
 
 #if USE___THREAD
 	mov ip, lr
+	cfi_register (lr, ip)
 	mov r1, r0
 
 	mov r0, #0xffff0fff
@@ -66,9 +67,13 @@
 1:	.word C_SYMBOL_NAME(rtld_errno) - 0b - 8
 #elif defined(_LIBC_REENTRANT)
 	str lr, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (lr, 0)
 	str r0, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
 	bl PLTJMP(C_SYMBOL_NAME(__errno_location))
 	ldr r1, [sp], #4
+	cfi_adjust_cfa_offset (-4)
 	str r1, [r0]
 	mvn r0, $0
 	ldr pc, [sp], #4	

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/Versions
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/Versions (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/Versions Fri Mar 26 13:47:59 2010
@@ -77,6 +77,10 @@
     #errlist-compat	138
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
+  GLIBC_2.12 {
+    #errlist-compat	139
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
+  }
   GLIBC_PRIVATE {
     __libc_alpha_cache_shape;
   }

Added: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S (added)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/____longjmp_chk.S Fri Mar 26 13:47:59 2010
@@ -1,0 +1,139 @@
+/* Copyright (C) 1992, 1994, 1997, 2006, 2010 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, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sysdep.h>
+#include <jmpbuf-offsets.h>
+
+
+	.section .rodata.str1.1,"aMS",@progbits,1
+	.type   longjmp_msg,@object
+longjmp_msg:
+	.string "longjmp causes uninitialized stack frame"
+	.size   longjmp_msg, .-longjmp_msg
+
+
+/* Jump to the position specified by ENV, causing the
+   setjmp call there to return VAL, or 1 if VAL is 0.
+   void __longjmp (__jmp_buf env, int val).  */
+	.text
+	.align	4
+	.globl	____longjmp_chk
+	.type	____longjmp_chk, @function
+	.usepv	____longjmp_chk, std
+
+	cfi_startproc
+____longjmp_chk:
+	ldgp    gp, 0(pv)
+#ifdef PROF
+	.set noat
+	lda     AT, _mcount
+	jsr     AT, (AT), _mcount
+	.set at
+#endif
+
+	ldq     s2, JB_PC*8(a0)
+	mov	a0, s0
+	ldq     fp, JB_FP*8(a0)
+	mov     a1, s1
+	ldq     s3, JB_SP*8(a0)
+	cmoveq  s1, 1, s1
+
+#ifdef PTR_DEMANGLE
+	PTR_DEMANGLE(s2, t1)
+	PTR_DEMANGLE2(s3, t1)
+	PTR_DEMANGLE2(fp, t1)
+#endif
+	cmpule	t0, sp, t1
+	bne	t1, .Lfail
+
+	.align	4
+.Lok:
+	mov	s0, a0
+	mov	s1, v0
+	mov	s3, t0
+	mov	s2, ra
+	cfi_remember_state
+	cfi_def_cfa(a0, 0)
+	cfi_register(sp, t0)
+	cfi_offset(s0, JB_S0*8)
+	cfi_offset(s1, JB_S1*8)
+	cfi_offset(s2, JB_S2*8)
+	cfi_offset(s3, JB_S3*8)
+	cfi_offset(s4, JB_S4*8)
+	cfi_offset(s5, JB_S5*8)
+	cfi_offset(s3, JB_S3*8)
+	cfi_offset($f2, JB_F2*8)
+	cfi_offset($f3, JB_F3*8)
+	cfi_offset($f4, JB_F4*8)
+	cfi_offset($f5, JB_F5*8)
+	cfi_offset($f6, JB_F6*8)
+	cfi_offset($f7, JB_F7*8)
+	cfi_offset($f8, JB_F8*8)
+	cfi_offset($f9, JB_F9*8)
+	ldq	s0, JB_S0*8(a0)
+	ldq	s1, JB_S1*8(a0)
+	ldq	s2, JB_S2*8(a0)
+	ldq	s3, JB_S3*8(a0)
+	ldq	s4, JB_S4*8(a0)
+	ldq	s5, JB_S5*8(a0)
+	ldt     $f2, JB_F2*8(a0)
+	ldt     $f3, JB_F3*8(a0)
+	ldt     $f4, JB_F4*8(a0)
+	ldt     $f5, JB_F5*8(a0)
+	ldt     $f6, JB_F6*8(a0)
+	ldt     $f7, JB_F7*8(a0)
+	ldt     $f8, JB_F8*8(a0)
+	ldt     $f9, JB_F9*8(a0)
+	mov     t0, sp
+	ret
+
+	.align	4
+.Lfail:
+	cfi_restore_state
+	lda	v0, __NR_sigaltstack
+	lda	a0, 0
+	lda	a1, -32(sp)
+	lda	sp, -32(sp)
+	cfi_adjust_cfa_offset(32)
+	callsys
+	ldq	t0, 0(sp)	/* ss_sp */
+	ldl	t1, 8(sp)	/* ss_flags */
+	ldq	t2, 16(sp)	/* ss_size */
+	lda	sp, 32(sp)
+	cfi_adjust_cfa_offset(-32)
+
+	/* Without working sigaltstack we cannot perform the test.  */
+	bne	a3, .Lok
+
+	addq	t0, t2, t0	/* t0 = ss_sp + ss_size */
+	subq	t0, s3, t0	/* t0 = (ss_sp + ss_size) - new_sp */
+	cmpule	t2, t0, t0	/* t0 = (t0 >= ss_size) */
+	and	t0, t1, t0	/* t0 = (t0 >= ss_size) & (ss_flags & SS_ONSTACK) */
+	bne	t0, .Lok
+
+	ldah	a0, longjmp_msg(gp)	!gprelhigh
+	lda	a0, longjmp_msg(a0)	!gprellow
+#ifdef PIC
+	jsr	ra, HIDDEN_JUMPTARGET(__fortify_fail)
+#else
+	bsr	ra, HIDDEN_JUMPTARGET(__fortify_fail)	!samegp
+#endif
+	bugchk
+
+	cfi_endproc
+	.size	____longjmp_chk, .-____longjmp_chk

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h Fri Mar 26 13:47:59 2010
@@ -81,7 +81,7 @@
 #define F_SETLK64	F_SETLK	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	F_SETLKW /* Set record locking info (blocking).  */
 
-#if defined __USE_BSD || defined __USE_UNIX98 || defiend __USE_XOPEN2K8
+#if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8
 # define F_SETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
 # define F_GETOWN	6	/* Set owner of socket (receiver of SIGIO).  */
 #endif
@@ -89,6 +89,8 @@
 #ifdef __USE_GNU
 # define F_SETSIG	10	/* Set number of signal to be sent.  */
 # define F_GETSIG	11	/* Get number of signal to be sent.  */
+# define F_SETOWN_EX	15	/* Get owner (thread receiving SIGIO).  */
+# define F_GETOWN_EX	16	/* Set owner (thread receiving SIGIO).  */
 #endif
 
 #ifdef __USE_GNU
@@ -161,6 +163,23 @@
   };
 #endif
 
+#ifdef __USE_GNU
+/* Owner types.  */
+enum __pid_type
+  {
+    F_OWNER_TID = 0,		/* Kernel thread.  */
+    F_OWNER_PID,		/* Process.  */
+    F_OWNER_PGRP,		/* Process group.  */
+    F_OWNER_GID = F_OWNER_PGRP	/* Alternative, obsolete name.  */
+  };
+
+/* Structure to use with F_GETOWN_EX and F_SETOWN_EX.  */
+struct f_owner_ex
+  {
+    enum __pid_type type;	/* Owner type of ID.  */
+    __pid_t pid;		/* ID of owner.  */
+  };
+#endif
 
 /* Define some more compatibility macros to be backward compatible with
    BSD systems which did not managed to hide these kernel macros.  */

Added: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/creat.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/creat.c (added)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/creat.c Fri Mar 26 13:47:59 2010
@@ -1,0 +1,8 @@
+/* sysdeps/unix/sysv/linux/wordsize-64/syscalls.list defines creat and
+   creat64 for most linux targets, but on alpha creat is not a syscall.
+   If we do nothing, we'll wind up with creat64 being undefined, because
+   the syscalls.list assumes the creat->creat64 alias was created.  We
+   could have overridden that with a create64.c, but we might as well do
+   the right thing and set up creat64 as an alias.  */
+#include <io/creat.c>
+weak_alias(__libc_creat, creat64)

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-auxv.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-auxv.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-auxv.h Fri Mar 26 13:47:59 2010
@@ -19,7 +19,7 @@
 
 /* Scan the Aux Vector for the cache shape entries.  */
 
-long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
+extern long __libc_alpha_cache_shape[4];
 
 #define DL_PLATFORM_AUXV				\
       case AT_L1I_CACHESHAPE:				\

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/dl-sysdep.c Fri Mar 26 13:47:59 2010
@@ -1,2 +1,5 @@
 #include "dl-auxv.h"
+
+long __libc_alpha_cache_shape[4] = { -2, -2, -2, -2 };
+
 #include <sysdeps/unix/sysv/linux/dl-sysdep.c>

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sys/user.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sys/user.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/alpha/sys/user.h Fri Mar 26 13:47:59 2010
@@ -23,7 +23,6 @@
    only. Don't read too much into it. Don't use it for anything other
    than gdb/strace unless you know what you are doing. */
 
-#include <asm/page.h>
 #include <asm/reg.h>
 
 struct user
@@ -41,6 +40,9 @@
   char u_comm[32];				/* user command name */
 };
 
+#define PAGE_SHIFT		13
+#define PAGE_SIZE		(1UL << PAGE_SHIFT)
+#define PAGE_MASK		(~(PAGE_SIZE-1))
 #define NBPG			PAGE_SIZE
 #define UPAGES			1
 #define HOST_TEXT_START_ADDR	(u.start_code)

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/clone.S Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009
+/* Copyright (C) 1996, 1997, 1998, 1999, 2002, 2005, 2008, 2009, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Pat Beirne <patb@xxxxxxxxxxxxxxxxx>
@@ -52,8 +52,13 @@
 	@ new sp is already in r1
 #ifdef __ARM_EABI__
 	stmfd	sp!, {r4, r7}
+	cfi_adjust_cfa_offset (8)
+	cfi_rel_offset (r4, 0)
+	cfi_rel_offset (r7, 4)
 #else
 	str	r4, [sp, #-8]!
+	cfi_adjust_cfa_offset (8)
+	cfi_rel_offset (r4, 0)
 #endif
 	ldr	r2, [sp, #8]
 	ldr	r3, [sp, #12]
@@ -64,6 +69,7 @@
 #else
 	swi	SYS_ify(clone)
 #endif
+	cfi_endproc
 	cmp	r0, #0
 	beq	1f
 #ifdef __ARM_EABI__
@@ -74,6 +80,8 @@
 	blt	PLTJMP(C_SYMBOL_NAME(__syscall_error))
 	RETINSTR(, lr)
 
+	cfi_startproc
+	cfi_undefined (lr)
 1:
 #ifdef RESET_PID
 	tst	ip, #CLONE_THREAD

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S Fri Mar 26 13:47:59 2010
@@ -30,6 +30,7 @@
 #ifdef PIC
 # define CALL_FAIL						\
 	ldr	sl, .L_GOT;					\
+	cfi_undefined (sl);					\
 .L_GOT_OFF:							\
 	add	sl, pc, sl;					\
 	ldr	r0, .Lstr;					\
@@ -48,12 +49,17 @@
 #endif
 
 #define CHECK_SP(reg)				\
+	cfi_remember_state;			\
 	cmp	sp, reg;			\
 	bls	.Lok;				\
 	mov	r5, r0;				\
+	cfi_undefined (r5);			\
 	mov	r7, #SYS_ify(sigaltstack);	\
+	cfi_undefined (r7);			\
 	mov	r0, #0;				\
-	sub	sp, sp, #16;			\
+	sub	sp, sp, #16; /* >= sizeof (stack_t) */ \
+	cfi_adjust_cfa_offset (16);		\
+	cfi_remember_state;			\
 	mov	r1, sp;				\
 	swi	#0;				\
 	cmp	r0, #0;				\
@@ -69,8 +75,10 @@
 	bhi	.Lok2;				\
 .Lfail:						\
 	CALL_FAIL				\
+	cfi_restore_state;			\
 .Lok2:						\
 	mov	r0, r5;				\
+	cfi_restore_state;			\
 .Lok:
 
 #include <__longjmp.S>

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/mmap64.S Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2003, 2005, 2009 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
@@ -34,8 +34,13 @@
 ENTRY (__mmap64)
 	ldr	ip, [sp, $LOW_OFFSET]
 	str	r5, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r5, 0)
 	ldr	r5, [sp, $HIGH_OFFSET]
 	str	r4, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r4, 0)
+	cfi_remember_state
 	movs	r4, ip, lsl $20		@ check that offset is page-aligned
 	mov	ip, ip, lsr $12
 	moveqs	r4, r5, lsr $12		@ check for overflow
@@ -45,11 +50,19 @@
 	DO_CALL (mmap2, 0)
 	cmn	r0, $4096
 	ldmfd	sp!, {r4, r5}
+	cfi_adjust_cfa_offset (-8)
+	cfi_restore (r4)
+	cfi_restore (r5)
 	RETINSTR(cc, lr)
 	b	PLTJMP(syscall_error)
+
+	cfi_restore_state
 .Linval:
 	mov	r0, $-EINVAL
 	ldmfd	sp!, {r4, r5}
+	cfi_adjust_cfa_offset (-8)
+	cfi_restore (r4)
+	cfi_restore (r5)
 	b	PLTJMP(syscall_error)
 PSEUDO_END (__mmap64)
 

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2009 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
@@ -36,17 +36,22 @@
   .type __##syscall_name##_nocancel,%function;				\
   .globl __##syscall_name##_nocancel;					\
   __##syscall_name##_nocancel:						\
+    .cfi_sections .debug_frame;						\
+    cfi_startproc;							\
     DO_CALL (syscall_name, args);					\
     PSEUDO_RET;								\
+    cfi_endproc;							\
   .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel;	\
   ENTRY (name);								\
     SINGLE_THREAD_P;							\
     DOARGS_##args;							\
     bne .Lpseudo_cancel;						\
+    cfi_remember_state;							\
     DO_CALL (syscall_name, 0);						\
     UNDOARGS_##args;							\
     cmn r0, $4096;							\
     PSEUDO_RET;								\
+    cfi_restore_state;							\
   .Lpseudo_cancel:							\
     .fnstart;								\
     DOCARGS_##args;	/* save syscall args etc. around CENABLE.  */	\
@@ -62,41 +67,127 @@
     mov r0, r7;		/* retrieve return value.  */			\
     RESTORE_LR_##args;							\
     UNDOARGS_##args;							\
-    cmn r0, $4096;
+    cmn r0, $4096
 
 /* DOARGS pushes four bytes on the stack for five arguments, eight bytes for
    six arguments, and nothing for fewer.  In order to preserve doubleword
    alignment, sometimes we must save an extra register.  */
 
-# define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr}
-
-# define DOCARGS_0	stmfd sp!, {r7, lr}; .save {r7, lr}
+# define RESTART_UNWIND \
+  .fnend; \
+  .fnstart; \
+  .save {r7, lr}
+
+# define DOCARGS_0 \
+  stmfd sp!, {r7, lr}; \
+  cfi_adjust_cfa_offset (8); \
+  cfi_rel_offset (r7, 0); \
+  cfi_rel_offset (lr, 4); \
+  .save {r7, lr}
 # define UNDOCARGS_0
-# define RESTORE_LR_0	ldmfd sp!, {r7, lr};
-
-# define DOCARGS_1	stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
-# define UNDOCARGS_1	ldr r0, [sp], #8; RESTART_UNWIND
-# define RESTORE_LR_1	RESTORE_LR_0
-
-# define DOCARGS_2	stmfd sp!, {r0, r1, r7, lr}; .save {r7, lr}; .pad #8
-# define UNDOCARGS_2	ldmfd sp!, {r0, r1}; RESTART_UNWIND
-# define RESTORE_LR_2	RESTORE_LR_0
-
-# define DOCARGS_3	stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
-# define UNDOCARGS_3	ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
-# define RESTORE_LR_3	RESTORE_LR_0
-
-# define DOCARGS_4	stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
-# define UNDOCARGS_4	ldmfd sp!, {r0, r1, r2, r3}; RESTART_UNWIND
-# define RESTORE_LR_4	RESTORE_LR_0
-
-# define DOCARGS_5	.save {r4}; stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; .save {r7, lr}; .pad #20
-# define UNDOCARGS_5	ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4
-# define RESTORE_LR_5	ldmfd sp!, {r4, r7, lr}
-
-# define DOCARGS_6	.save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #16
-# define UNDOCARGS_6	ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr}
-# define RESTORE_LR_6	RESTORE_LR_0
+# define RESTORE_LR_0 \
+  ldmfd sp!, {r7, lr}; \
+  cfi_adjust_cfa_offset (-8); \
+  cfi_restore (r7); \
+  cfi_restore (lr)
+
+# define DOCARGS_1 \
+  stmfd sp!, {r0, r1, r7, lr}; \
+  cfi_adjust_cfa_offset (16); \
+  cfi_rel_offset (r7, 8); \
+  cfi_rel_offset (lr, 12); \
+  .save {r7, lr}; \
+  .pad #8
+# define UNDOCARGS_1 \
+  ldr r0, [sp], #8; \
+  cfi_adjust_cfa_offset (-8); \
+  RESTART_UNWIND
+# define RESTORE_LR_1 \
+  RESTORE_LR_0
+
+# define DOCARGS_2 \
+  stmfd sp!, {r0, r1, r7, lr}; \
+  cfi_adjust_cfa_offset (16); \
+  cfi_rel_offset (r7, 8); \
+  cfi_rel_offset (lr, 12); \
+  .save {r7, lr}; \
+  .pad #8
+# define UNDOCARGS_2 \
+  ldmfd sp!, {r0, r1}; \
+  cfi_adjust_cfa_offset (-8); \
+  RESTART_UNWIND
+# define RESTORE_LR_2 \
+  RESTORE_LR_0
+
+# define DOCARGS_3 \
+  stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
+  cfi_adjust_cfa_offset (24); \
+  cfi_rel_offset (r7, 16); \
+  cfi_rel_offset (lr, 20); \
+  .save {r7, lr}; \
+  .pad #16
+# define UNDOCARGS_3 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  RESTART_UNWIND
+# define RESTORE_LR_3 \
+  RESTORE_LR_0
+
+# define DOCARGS_4 \
+  stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
+  cfi_adjust_cfa_offset (24); \
+  cfi_rel_offset (r7, 16); \
+  cfi_rel_offset (lr, 20); \
+  .save {r7, lr}; \
+  .pad #16
+# define UNDOCARGS_4 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  RESTART_UNWIND
+# define RESTORE_LR_4 \
+  RESTORE_LR_0
+
+/* r4 is only stmfd'ed for correct stack alignment.  */
+# define DOCARGS_5 \
+  .save {r4}; \
+  stmfd sp!, {r0, r1, r2, r3, r4, r7, lr}; \
+  cfi_adjust_cfa_offset (28); \
+  cfi_rel_offset (r7, 20); \
+  cfi_rel_offset (lr, 24); \
+  .save {r7, lr}; \
+  .pad #20
+# define UNDOCARGS_5 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  .fnend; \
+  .fnstart; \
+  .save {r4}; \
+  .save {r7, lr}; \
+  .pad #4
+# define RESTORE_LR_5 \
+  ldmfd sp!, {r4, r7, lr}; \
+  cfi_adjust_cfa_offset (-12); \
+  /* r4 will be marked as restored later.  */ \
+  cfi_restore (r7); \
+  cfi_restore (lr)
+
+# define DOCARGS_6 \
+  .save {r4, r5}; \
+  stmfd sp!, {r0, r1, r2, r3, r7, lr}; \
+  cfi_adjust_cfa_offset (24); \
+  cfi_rel_offset (r7, 16); \
+  cfi_rel_offset (lr, 20); \
+  .save {r7, lr}; \
+  .pad #16
+# define UNDOCARGS_6 \
+  ldmfd sp!, {r0, r1, r2, r3}; \
+  cfi_adjust_cfa_offset (-16); \
+  .fnend; \
+  .fnstart; \
+  .save {r4, r5}; \
+  .save {r7, lr}
+# define RESTORE_LR_6 \
+  RESTORE_LR_0
 
 # ifdef IS_IN_libpthread
 #  define CENABLE	bl PLTJMP(__pthread_enable_asynccancel)
@@ -136,9 +227,13 @@
 #   define PSEUDO_PROLOGUE
 #   define SINGLE_THREAD_P						\
   stmfd	sp!, {r0, lr};							\
+  cfi_adjust_cfa_offset (8);						\
+  cfi_rel_offset (lr, 4);						\
   bl	__aeabi_read_tp;						\
   ldr	ip, [r0, #MULTIPLE_THREADS_OFFSET];				\
   ldmfd	sp!, {r0, lr};							\
+  cfi_adjust_cfa_offset (-8);						\
+  cfi_restore (lr);							\
   teq	ip, #0
 #   define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P
 #  endif

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>.
 
@@ -89,7 +89,15 @@
 "	.globl	_Unwind_Resume\n"
 "	.type	_Unwind_Resume, %function\n"
 "_Unwind_Resume:\n"
+"	.cfi_sections .debug_frame\n"
+"	" CFI_STARTPROC "\n"
 "	stmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
+"	" CFI_REL_OFFSET (r4, 0) "\n"
+"	" CFI_REL_OFFSET (r5, 4) "\n"
+"	" CFI_REL_OFFSET (r6, 8) "\n"
+"	" CFI_REL_OFFSET (lr, 12) "\n"
+"	" CFI_REMEMBER_STATE "\n"
 "	ldr	r4, 1f\n"
 "	ldr	r5, 2f\n"
 "3:	add	r4, pc, r4\n"
@@ -99,10 +107,17 @@
 "	beq	4f\n"
 "5:	mov	r0, r6\n"
 "	ldmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
+"	" CFI_RESTORE (r4) "\n"
+"	" CFI_RESTORE (r5) "\n"
+"	" CFI_RESTORE (r6) "\n"
+"	" CFI_RESTORE (lr) "\n"
 "	bx	r3\n"
+"	" CFI_RESTORE_STATE "\n"
 "4:	bl	pthread_cancel_init\n"
 "	ldr	r3, [r4, r5]\n"
 "	b	5b\n"
+"	" CFI_ENDPROC "\n"
 "	.align 2\n"
 #ifdef __thumb2__
 "1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Jakub Jelinek <jakub@xxxxxxxxxx>.
 
@@ -52,7 +52,15 @@
 "	.globl	_Unwind_Resume\n"
 "	.type	_Unwind_Resume, %function\n"
 "_Unwind_Resume:\n"
+"	.cfi_sections .debug_frame\n"
+"	" CFI_STARTPROC "\n"
 "	stmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (16)" \n"
+"	" CFI_REL_OFFSET (r4, 0) "\n"
+"	" CFI_REL_OFFSET (r5, 4) "\n"
+"	" CFI_REL_OFFSET (r6, 8) "\n"
+"	" CFI_REL_OFFSET (lr, 12) "\n"
+"	" CFI_REMEMBER_STATE "\n"
 "	ldr	r4, 1f\n"
 "	ldr	r5, 2f\n"
 "3:	add	r4, pc, r4\n"
@@ -62,10 +70,17 @@
 "	beq	4f\n"
 "5:	mov	r0, r6\n"
 "	ldmfd	sp!, {r4, r5, r6, lr}\n"
+"	" CFI_ADJUST_CFA_OFFSET (-16) "\n"
+"	" CFI_RESTORE (r4) "\n"
+"	" CFI_RESTORE (r5) "\n"
+"	" CFI_RESTORE (r6) "\n"
+"	" CFI_RESTORE (lr) "\n"
 "	bx	r3\n"
+"	" CFI_RESTORE_STATE "\n"
 "4:	bl	init\n"
 "	ldr	r3, [r4, r5]\n"
 "	b	5b\n"
+"	" CFI_ENDPROC "\n"
 "	.align 2\n"
 #ifdef __thumb2__
 "1:	.word	_GLOBAL_OFFSET_TABLE_ - 3b - 4\n"

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2005, 2009, 2010 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
@@ -34,46 +34,89 @@
    Because the signal frame layout changed in 2.6.18, we provide two
    copies of these functions with different unwind information.  */
 
+/* Used in ENTRY.  */
+#undef cfi_startproc
+#define cfi_startproc \
+	.cfi_startproc simple; \
+	.cfi_signal_frame
+
+/* The CFA is not computed / used correctly here; this is neither trivial to
+   do, nor is it needed.  */
+#define CFI \
+	cfi_def_cfa (sp, 0); \
+	cfi_offset (r0, OFFSET + 0 * 4); \
+	cfi_offset (r1, OFFSET + 1 * 4); \
+	cfi_offset (r2, OFFSET + 2 * 4); \
+	cfi_offset (r3, OFFSET + 3 * 4); \
+	cfi_offset (r4, OFFSET + 4 * 4); \
+	cfi_offset (r5, OFFSET + 5 * 4); \
+	cfi_offset (r6, OFFSET + 6 * 4); \
+	cfi_offset (r7, OFFSET + 7 * 4); \
+	cfi_offset (r8, OFFSET + 8 * 4); \
+	cfi_offset (r9, OFFSET + 9 * 4); \
+	cfi_offset (r10, OFFSET + 10 * 4); \
+	cfi_offset (r11, OFFSET + 11 * 4); \
+	cfi_offset (r12, OFFSET + 12 * 4); \
+	cfi_offset (r13, OFFSET + 13 * 4); \
+	cfi_offset (r14, OFFSET + 14 * 4); \
+	cfi_offset (r15, OFFSET + 15 * 4)
+
 #ifndef __ASSUME_SIGFRAME_V2
+#define OFFSET 12
 	.fnstart
 	.save {r0-r15}
-	.pad #12
+	.pad #OFFSET
 	nop
 ENTRY(__default_sa_restorer_v1)
+	CFI
 	mov	r7, $SYS_ify(sigreturn)
 	swi	0x0
 	.fnend
-#endif
+END(__default_sa_restorer_v1)
+#undef OFFSET
+#endif /* __ASSUME_SIGFRAME_V2 */
 
+#define OFFSET 32
 	.fnstart
 	.save {r0-r15}
-	.pad #32
+	.pad #OFFSET
 	nop
 ENTRY(__default_sa_restorer_v2)
+	CFI
 	mov	r7, $SYS_ify(sigreturn)
 	swi	0x0
 	.fnend
+END(__default_sa_restorer_v2)
+#undef OFFSET
 
 #ifdef __NR_rt_sigreturn
 
 #ifndef __ASSUME_SIGFRAME_V2
+#define OFFSET 168
 	.fnstart
 	.save {r0-r15}
-	.pad #168
+	.pad #OFFSET
 	nop
 ENTRY(__default_rt_sa_restorer_v1)
+	CFI
 	mov	r7, $SYS_ify(rt_sigreturn)
 	swi	0x0
 	.fnend
-#endif
+END(__default_rt_sa_restorer_v1)
+#undef OFFSET
+#endif /* __ASSUME_SIGFRAME_V2 */
 
+#define OFFSET 160
 	.fnstart
 	.save {r0-r15}
-	.pad #160
+	.pad #OFFSET
 	nop
 ENTRY(__default_rt_sa_restorer_v2)
+	CFI
 	mov	r7, $SYS_ify(rt_sigreturn)
 	swi	0x0
 	.fnend
+END(__default_rt_sa_restorer_v2)
+#undef OFFSET
 
-#endif
+#endif /* __NR_rt_sigreturn */

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/syscall.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/syscall.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/syscall.S Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2009 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
@@ -25,6 +25,11 @@
 ENTRY (syscall)
 	mov	ip, sp
 	stmfd	sp!, {r4, r5, r6, r7}
+	cfi_adjust_cfa_offset (16)
+	cfi_rel_offset (r4, 0)
+	cfi_rel_offset (r5, 4)
+	cfi_rel_offset (r6, 8)
+	cfi_rel_offset (r7, 12)
 	mov	r7, r0
 	mov	r0, r1
 	mov	r1, r2
@@ -32,6 +37,11 @@
 	ldmfd	ip, {r3, r4, r5, r6}
 	swi	0x0
 	ldmfd	sp!, {r4, r5, r6, r7}
+	cfi_adjust_cfa_offset (-16)
+	cfi_restore (r4)
+	cfi_restore (r5)
+	cfi_restore (r6)
+	cfi_restore (r7)
 	cmn	r0, #4096
 	RETINSTR(cc, lr)
 	b	PLTJMP(syscall_error)

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007
+/* Copyright (C) 2005, 2006, 2007, 2009
    Free Software Foundation, Inc.
 
    This file is part of the GNU C Library.
@@ -50,6 +50,7 @@
    For the moment the LOAD_ARGS_7 is sacrificed.
    We can't use push/pop inside the asm because that breaks
    unwinding (ie. thread cancellation).  */
+/* FIXME: the str / ldr of r7 are not covered by CFI information.  */
 #undef LOAD_ARGS_7
 #undef INTERNAL_SYSCALL_RAW
 #define INTERNAL_SYSCALL_RAW(name, err, nr, args...)		\
@@ -100,11 +101,13 @@
 
 #undef	DO_CALL
 #define DO_CALL(syscall_name, args)		\
-    DOARGS_##args				\
+    DOARGS_##args;				\
     mov ip, r7;					\
+    cfi_register (r7, ip);			\
     ldr r7, =SYS_ify (syscall_name);		\
     swi 0x0;					\
     mov r7, ip;					\
+    cfi_restore (r7);				\
     UNDOARGS_##args
 
 #endif /* _LINUX_ARM_EABI_SYSDEP_H */

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/mmap.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/mmap.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/mmap.S Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2003, 2005, 2009 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
@@ -33,8 +33,13 @@
 
 	/* shuffle args */
 	str	r5, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r5, 0)
 	ldr	r5, [sp, #8]
 	str	r4, [sp, #-4]!
+	cfi_adjust_cfa_offset (4)
+	cfi_rel_offset (r4, 0)
+	cfi_remember_state
 	ldr	r4, [sp, #8]
 
 	/* convert offset to pages */
@@ -48,12 +53,17 @@
 	/* restore registers */
 2:
 	ldr	r4, [sp], #4
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r4)
 	ldr	r5, [sp], #4
+	cfi_adjust_cfa_offset (-4)
+	cfi_restore (r5)
 
 	cmn	r0, $4096
 	RETINSTR(cc, lr)
 	b	PLTJMP(syscall_error)
 
+	cfi_restore_state
 .Linval:
 	mov	r0, #-EINVAL
 	b	2b
@@ -74,6 +84,7 @@
 
 	/* store args on the stack */
 	stmdb	sp!, {a1-a4}
+	cfi_adjust_cfa_offset (16)
 
 	/* do the syscall */
 	mov	a1, sp
@@ -81,6 +92,7 @@
 
 	/* pop args off the stack. */
 	add	sp, sp, #16
+	cfi_adjust_cfa_offset (-16)
 
 	cmn	r0, $4096
 	RETINSTR(cc, lr)

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 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
@@ -21,10 +21,14 @@
 /* Save the PID value.  */
 #define SAVE_PID \
 	str	lr, [sp, #-4]!;		/* Save LR.  */			\
+	cfi_adjust_cfa_offset (4);					\
+	cfi_rel_offset (lr, 0);						\
 	mov	r0, #0xffff0fff;	/* Point to the high page.  */	\
 	mov	lr, pc;			/* Save our return address.  */	\
 	sub	pc, r0, #31;		/* Jump to the TLS entry.  */	\
 	ldr	lr, [sp], #4;		/* Restore LR.  */		\
+	cfi_adjust_cfa_offset (-4);					\
+	cfi_restore (lr);						\
 	mov	r2, r0;			/* Save the TLS addr in r2.  */	\
 	ldr	r3, [r2, #PID_OFFSET];	/* Load the saved PID.  */	\
 	rsb	r0, r3, #0;		/* Negate it.  */		\

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S Fri Mar 26 13:47:59 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2010 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
@@ -21,10 +21,14 @@
 /* Save the PID value.  */
 #define SAVE_PID \
 	str	lr, [sp, #-4]!;		/* Save LR.  */			\
+	cfi_adjust_cfa_offset (4);					\
+	cfi_rel_offset (lr, 0);						\
 	mov	r0, #0xffff0fff;	/* Point to the high page.  */	\
 	mov	lr, pc;			/* Save our return address.  */	\
 	sub	pc, r0, #31;		/* Jump to the TLS entry.  */	\
 	ldr	lr, [sp], #4;		/* Restore LR.  */		\
+	cfi_adjust_cfa_offset (-4);					\
+	cfi_restore (lr);						\
 	mov	r2, r0;			/* Save the TLS addr in r2.  */	\
 	ldr	r3, [r2, #PID_OFFSET];	/* Load the saved PID.  */	\
 	rsbs	r0, r3, #0;		/* Negate it.  */		\

Modified: fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
==============================================================================
--- fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h (original)
+++ fsf/trunk/ports/sysdeps/unix/sysv/linux/arm/sysdep.h Fri Mar 26 13:47:59 2010
@@ -84,7 +84,7 @@
 
 #undef	PSEUDO_END
 #define	PSEUDO_END(name)						      \
-  SYSCALL_ERROR_HANDLER							      \
+  SYSCALL_ERROR_HANDLER;						      \
   END (name)
 
 #undef	PSEUDO_NOERRNO
@@ -129,17 +129,26 @@
        DO_RET(lr);						\
 1:     .word C_SYMBOL_NAME(rtld_errno) - 0b - 8;
 # else
-#if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
-#define POP_PC  ldr     lr, [sp], #4; bx lr
-#else
-#define POP_PC  ldr     pc, [sp], #4
-#endif
+#  if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
+#   define POP_PC \
+  ldr lr, [sp], #4; \
+  cfi_adjust_cfa_offset (-4); \
+  cfi_restore (lr); \
+  bx lr
+#  else
+#   define POP_PC  \
+  ldr pc, [sp], #4
+#  endif
 #  define SYSCALL_ERROR_HANDLER					\
 __local_syscall_error:						\
 	str	lr, [sp, #-4]!;					\
+	cfi_adjust_cfa_offset (4);				\
+	cfi_rel_offset (lr, 0);					\
 	str	r0, [sp, #-4]!;					\
+	cfi_adjust_cfa_offset (4);				\
 	bl	PLTJMP(C_SYMBOL_NAME(__errno_location)); 	\
 	ldr	r1, [sp], #4;					\
+	cfi_adjust_cfa_offset (-4);				\
 	rsb	r1, r1, #0;					\
 	str	r1, [r0];					\
 	mvn	r0, #0;						\
@@ -179,7 +188,7 @@
 
 #undef	DO_CALL
 #define DO_CALL(syscall_name, args)		\
-    DOARGS_##args				\
+    DOARGS_##args;				\
     swi SYS_ify (syscall_name); 		\
     UNDOARGS_##args
 
@@ -188,18 +197,47 @@
 #define DOARGS_2 /* nothing */
 #define DOARGS_3 /* nothing */
 #define DOARGS_4 /* nothing */
-#define DOARGS_5 str r4, [sp, $-4]!; ldr r4, [sp, $4];
-#define DOARGS_6 mov ip, sp; stmfd sp!, {r4, r5}; ldmia ip, {r4, r5};
-#define DOARGS_7 mov ip, sp; stmfd sp!, {r4, r5, r6}; ldmia ip, {r4, r5, r6};
+#define DOARGS_5 \
+  str r4, [sp, $-4]!; \
+  cfi_adjust_cfa_offset (4); \
+  cfi_rel_offset (r4, 0); \
+  ldr r4, [sp, $4]
+#define DOARGS_6 \
+  mov ip, sp; \
+  stmfd sp!, {r4, r5}; \
+  cfi_adjust_cfa_offset (8); \
+  cfi_rel_offset (r4, 0); \
+  cfi_rel_offset (r5, 4); \
+  ldmia ip, {r4, r5}
+#define DOARGS_7 \
+  mov ip, sp; \
+  stmfd sp!, {r4, r5, r6}; \
+  cfi_adjust_cfa_offset (12); \
+  cfi_rel_offset (r4, 0); \
+  cfi_rel_offset (r5, 4); \
+  cfi_rel_offset (r6, 8); \
+  ldmia ip, {r4, r5, r6}
 
 #define UNDOARGS_0 /* nothing */
 #define UNDOARGS_1 /* nothing */
 #define UNDOARGS_2 /* nothing */
 #define UNDOARGS_3 /* nothing */
 #define UNDOARGS_4 /* nothing */
-#define UNDOARGS_5 ldr r4, [sp], $4;
-#define UNDOARGS_6 ldmfd sp!, {r4, r5};
-#define UNDOARGS_7 ldmfd sp!, {r4, r5, r6};
+#define UNDOARGS_5 \
+  ldr r4, [sp], $4; \
+  cfi_adjust_cfa_offset (-4); \
+  cfi_restore (r4)
+#define UNDOARGS_6 \
+  ldmfd sp!, {r4, r5}; \
+  cfi_adjust_cfa_offset (-8); \
+  cfi_restore (r4); \
+  cfi_restore (r5)
+#define UNDOARGS_7 \
+  ldmfd sp!, {r4, r5, r6}; \
+  cfi_adjust_cfa_offset (-12); \
+  cfi_restore (r4); \
+  cfi_restore (r5); \
+  cfi_restore (r6)
 
 #else /* not __ASSEMBLER__ */