summaryrefslogtreecommitdiff
path: root/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/unix/sysv/linux/powerpc/powerpc64')
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S18
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S6
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S38
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure166
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac15
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c5
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c12
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h6
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S18
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power8/Implies2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S20
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S31
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h2
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym21
-rw-r--r--libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S2
33 files changed, 291 insertions, 107 deletions
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile
deleted file mode 100644
index 3ba3b1f6e..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-# See Makeconfig regarding the use of default-abi.
-default-abi := 64
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S
index 270e21e00..dc9c8540f 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2009-2014 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,24 +33,24 @@
cmpld reg, r1; \
bge+ .Lok; \
mflr r0; \
- std r0,16(r1); \
+ std r0,FRAME_LR_SAVE(r1); \
mr r31,r3; \
mr r30,r4; \
- stdu r1,-144(r1); \
+ stdu r1,-FRAME_MIN_SIZE-32(r1); \
cfi_remember_state; \
- cfi_adjust_cfa_offset (144); \
- cfi_offset (lr, 16); \
+ cfi_adjust_cfa_offset (FRAME_MIN_SIZE+32); \
+ cfi_offset (lr, FRAME_LR_SAVE); \
li r3,0; \
- addi r4,r1,112; \
+ addi r4,r1,FRAME_MIN_SIZE; \
li r0,__NR_sigaltstack; \
sc; \
/* Without working sigaltstack we cannot perform the test. */ \
bso .Lok2; \
- lwz r0,112+8(r1); \
+ lwz r0,FRAME_MIN_SIZE+8(r1); \
andi. r4,r0,1; \
beq .Lfail; \
- ld r0,112+16(r1); \
- ld r4,112(r1); \
+ ld r0,FRAME_MIN_SIZE+16(r1); \
+ ld r4,FRAME_MIN_SIZE(r1); \
add r4,r4,r0; \
sub r3,r3,reg; \
cmpld r3,r0; \
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
index 348aeb5ba..30f66a83a 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
@@ -1,5 +1,5 @@
/* brk system call for Linux. PowerPC64 version.
- Copyright (C) 1995-2013 Free Software Foundation, Inc.
+ Copyright (C) 1995-2014 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,9 +28,9 @@
ENTRY (__brk)
CALL_MCOUNT 1
- std r3,48(r1)
+ std r3,-8(r1)
DO_CALL(SYS_ify(brk))
- ld r6,48(r1)
+ ld r6,-8(r1)
ld r5,.LC__curbrk@toc(r2)
std r3,0(r5)
cmpld r6,r3
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
index cf46856e1..d8fefdd3b 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
@@ -1,5 +1,5 @@
/* Wrapper around clone system call. PowerPC64 version.
- Copyright (C) 1997-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 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
@@ -40,22 +40,22 @@ ENTRY (__clone)
cror cr0*4+eq,cr1*4+eq,cr0*4+eq
beq- cr0,L(badargs)
- /* Save some regs in parm save area. */
+ /* Save some regs in the "red zone". */
#ifdef RESET_PID
- std r29,48(r1)
+ std r29,-24(r1)
#endif
- std r30,56(r1)
- std r31,64(r1)
+ std r30,-16(r1)
+ std r31,-8(r1)
#ifdef RESET_PID
- cfi_offset(r29,48)
+ cfi_offset(r29,-24)
#endif
- cfi_offset(r30,56)
- cfi_offset(r31,64)
+ cfi_offset(r30,-16)
+ cfi_offset(r31,-8)
/* Set up stack frame for child. */
clrrdi r4,r4,4
li r0,0
- stdu r0,-112(r4) /* min stack frame is 112 bytes per ABI */
+ stdu r0,-FRAME_MIN_SIZE_PARM(r4)
/* Save fn, args, stack across syscall. */
mr r30,r3 /* Function in r30. */
@@ -97,14 +97,12 @@ L(nomoregetpid):
L(oldpid):
#endif
- std r2,40(r1)
+ std r2,FRAME_TOC_SAVE(r1)
/* Call procedure. */
- ld r0,0(r30)
- ld r2,8(r30)
- mtctr r0
+ PPC64_LOAD_FUNCPTR r30
mr r3,r31
bctrl
- ld r2,40(r1)
+ ld r2,FRAME_TOC_SAVE(r1)
/* Call _exit with result from procedure. */
#ifdef SHARED
b JUMPTARGET(__GI__exit)
@@ -123,15 +121,15 @@ L(badargs):
L(parent):
/* Parent. Restore registers & return. */
#ifdef RESET_PID
- cfi_offset(r29,48)
+ cfi_offset(r29,-24)
#endif
- cfi_offset(r30,56)
- cfi_offset(r31,64)
+ cfi_offset(r30,-16)
+ cfi_offset(r31,-8)
#ifdef RESET_PID
- ld r29,48(r1)
+ ld r29,-24(r1)
#endif
- ld r30,56(r1)
- ld r31,64(r1)
+ ld r30,-16(r1)
+ ld r31,-8(r1)
#ifdef RESET_PID
cfi_restore(r29)
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
new file mode 100644
index 000000000..fbb6334a9
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -0,0 +1,166 @@
+# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
+ # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/.
+
+# Define default-abi according to compiler flags.
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the PowerPC64 ELFv2 ABI" >&5
+$as_echo_n "checking whether the compiler is using the PowerPC64 ELFv2 ABI... " >&6; }
+if ${libc_cv_ppc64_elfv2_abi+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if _CALL_ELF == 2
+ yes
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ libc_cv_ppc64_elfv2_abi=yes
+else
+ libc_cv_ppc64_elfv2_abi=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_elfv2_abi" >&5
+$as_echo "$libc_cv_ppc64_elfv2_abi" >&6; }
+if test $libc_cv_ppc64_elfv2_abi = yes; then
+ config_vars="$config_vars
+default-abi = 64-v2"
+else
+ config_vars="$config_vars
+default-abi = 64-v1"
+fi
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
new file mode 100644
index 000000000..c9cd4bc8f
--- /dev/null
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -0,0 +1,15 @@
+GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/.
+
+# Define default-abi according to compiler flags.
+AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI],
+ [libc_cv_ppc64_elfv2_abi],
+ [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2
+ yes
+ #endif
+ ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)])
+if test $libc_cv_ppc64_elfv2_abi = yes; then
+ LIBC_CONFIG_VAR([default-abi], [64-v2])
+else
+ LIBC_CONFIG_VAR([default-abi], [64-v1])
+fi
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h
index dcde5a0de..06571464a 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h
@@ -1,5 +1,5 @@
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2014 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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
index bedad10cf..a9252d7d3 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2014 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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies
deleted file mode 100644
index 6243d2ef2..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-# Override ldbl-opt with powerpc64 specific routines.
-powerpc/powerpc64/fpu
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c
index 2ab585500..35fc58421 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c
@@ -1,5 +1,5 @@
/* Procedure definition for FE_MASK_ENV for Linux/ppc64.
- Copyright (C) 2007-2013 Free Software Foundation, Inc.
+ Copyright (C) 2007-2014 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
@@ -27,9 +27,8 @@ const fenv_t *
__fe_mask_env (void)
{
#if defined PR_SET_FPEXC && defined PR_FP_EXC_DISABLED
- int result;
INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
+ INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_DISABLED);
#else
__set_errno (ENOSYS);
#endif
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c
index fd2ffb14f..c6c156ce7 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c
@@ -1,5 +1,5 @@
/* Procedure definition for FE_NOMASK_ENV for Linux/ppc64.
- Copyright (C) 2003-2013 Free Software Foundation, Inc.
+ Copyright (C) 2003-2014 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
@@ -22,17 +22,19 @@
#include <sys/syscall.h>
#include <sys/prctl.h>
#include <kernel-features.h>
+#include <shlib-compat.h>
const fenv_t *
-__fe_nomask_env (void)
+__fe_nomask_env_priv (void)
{
#if defined PR_SET_FPEXC && defined PR_FP_EXC_PRECISE
- int result;
INTERNAL_SYSCALL_DECL (err);
- result = INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
+ INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE);
#else
__set_errno (ENOSYS);
#endif
return FE_ENABLED_ENV;
}
-libm_hidden_def (__fe_nomask_env)
+#if SHLIB_COMPAT (libm, GLIBC_2_3, GLIBC_2_19)
+compat_symbol (libm, __fe_nomask_env_priv, __fe_nomask_env, GLIBC_2_3);
+#endif
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
index c236ab4b4..85ae1c866 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
@@ -1,5 +1,5 @@
/* Save current context.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2014 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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h
index 98ea73e70..df9873686 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h
@@ -1,5 +1,5 @@
/* Definition of `struct stat' used in the kernel.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2014 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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
index 4263b1aed..491db8f71 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h
@@ -1,5 +1,5 @@
/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2014 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
@@ -23,6 +23,8 @@
/* Now define our stuff. */
+#if _CALL_ELF != 2
+
static __always_inline bool
_dl_ppc64_is_opd_sym (const struct link_map *l, const ElfW(Sym) *sym)
{
@@ -73,4 +75,6 @@ _dl_ppc64_addr_sym_match (const struct link_map *l, const ElfW(Sym) *sym,
#define DL_ADDR_SYM_MATCH(L, SYM, MATCHSYM, ADDR) \
_dl_ppc64_addr_sym_match (L, SYM, MATCHSYM, ADDR)
+#endif
+
#endif /* ldsodefs.h */
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
index 32fc47c3f..e22f5a695 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
@@ -1,5 +1,5 @@
/* Create new context.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2014 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
@@ -111,6 +111,7 @@ L(parmloop):
L(noparms):
+#if _CALL_ELF != 2
/* Load the function address and TOC from the function descriptor
and store them in the ucontext as NIP and r2. Store the 3rd
field of the function descriptor into the ucontext as r11 in case
@@ -121,6 +122,12 @@ L(noparms):
std r0,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r3)
std r10,(SIGCONTEXT_GP_REGS+(PT_R2*8))(r3)
std r9,(SIGCONTEXT_GP_REGS+(PT_R11*8))(r3)
+#else
+ /* In the ELFv2 ABI, the function pointer is already the address.
+ Store it as NIP and r12 as required by the ABI. */
+ std r4,(SIGCONTEXT_GP_REGS+(PT_NIP*8))(r3)
+ std r4,(SIGCONTEXT_GP_REGS+(PT_R12*8))(r3)
+#endif
/* If the target function returns we need to do some cleanup. We use a
code trick to get the address of our cleanup function into the link
@@ -129,6 +136,10 @@ L(noparms):
the cpu link stack used to predict blr return addresses. */
bcl 20,31,L(gotexitcodeaddr);
+ /* End FDE now, because while executing on the context's stack
+ the unwind info would be wrong otherwise. */
+ cfi_endproc
+
/* This is the helper code which gets called if a function which
is registered with 'makecontext' returns. In this case we
have to install the context listed in the uc_link element of
@@ -157,6 +168,11 @@ L(do_exit):
#endif
b L(do_exit)
+ /* Re-establish FDE for the rest of the actual makecontext routine. */
+ cfi_startproc
+ cfi_offset (lr, FRAME_LR_SAVE)
+ cfi_adjust_cfa_offset (128)
+
/* The address of the exit code is in the link register. Store the lr
in the ucontext as LNK so the target function will return to our
exit code. */
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/Implies
deleted file mode 100644
index bedb20b65..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power4/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power4/fpu
-powerpc/powerpc64/power4
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/Implies
deleted file mode 100644
index 4c782d412..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5+/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power5+/fpu
-powerpc/powerpc64/power5+
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/Implies
deleted file mode 100644
index a01a13ab1..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power5/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power5/fpu
-powerpc/powerpc64/power5
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/Implies
deleted file mode 100644
index 9d68f39d2..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power6/fpu
-powerpc/powerpc64/power6
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/Implies
deleted file mode 100644
index 901977825..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power6x/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power6x/fpu
-powerpc/powerpc64/power6x
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/Implies
deleted file mode 100644
index 9a5e3c727..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power7/fpu
-powerpc/powerpc64/power7
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power8/Implies b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power8/Implies
deleted file mode 100644
index fad2505ab..000000000
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power8/Implies
+++ /dev/null
@@ -1,2 +0,0 @@
-powerpc/powerpc64/power8/fpu
-powerpc/powerpc64/power8
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
index 70f1d6c58..4824010bf 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
index a11f6e31f..2f915805d 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
index 0ccb0a98a..cc62a50ea 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
index 6a8acb451..a8543977f 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
index e1f0b8624..0cb84dcba 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
@@ -1,5 +1,5 @@
/* Switch to context.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2014 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
@@ -129,6 +129,10 @@ ENTRY(__novec_setcontext)
lfd fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
lfd fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r31)
+ /* End FDE now, because the unwind info would be wrong while
+ we're reloading registers to switch to the new context. */
+ cfi_endproc
+
ld r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
ld r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r31)
mtlr r0
@@ -177,6 +181,11 @@ ENTRY(__novec_setcontext)
ld r31,(SIGCONTEXT_GP_REGS+(PT_R31*8))(r31)
bctr
+ /* Re-establish FDE for the rest of the actual setcontext routine. */
+ cfi_startproc
+ cfi_offset (lr, FRAME_LR_SAVE)
+ cfi_adjust_cfa_offset (128)
+
L(nv_error_exit):
ld r0,128+FRAME_LR_SAVE(r1)
addi r1,r1,128
@@ -403,6 +412,10 @@ L(has_no_vec):
lfd fp1,(SIGCONTEXT_FP_REGS+(PT_R1*8))(r31)
lfd fp0,(SIGCONTEXT_FP_REGS+(PT_R0*8))(r31)
+ /* End FDE now, because the unwind info would be wrong while
+ we're reloading registers to switch to the new context. */
+ cfi_endproc
+
ld r0,(SIGCONTEXT_GP_REGS+(PT_LNK*8))(r31)
ld r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r31)
mtlr r0
@@ -451,6 +464,11 @@ L(has_no_vec):
ld r31,(SIGCONTEXT_GP_REGS+(PT_R31*8))(r31)
bctr
+ /* Re-establish FDE for the rest of the actual setcontext routine. */
+ cfi_startproc
+ cfi_offset (lr, FRAME_LR_SAVE)
+ cfi_adjust_cfa_offset (128)
+
L(error_exit):
ld r0,128+FRAME_LR_SAVE(r1)
addi r1,r1,128
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
index 018e55c99..2a253e18c 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014 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,8 +46,13 @@
# endif
#endif
-#define FRAMESIZE 128
-#define stackblock FRAMESIZE+48 /* offset to parm save area. */
+#if _CALL_ELF == 2
+#define FRAMESIZE (FRAME_MIN_SIZE+16+64)
+#define stackblock (FRAME_MIN_SIZE+16)
+#else
+#define FRAMESIZE (FRAME_MIN_SIZE+16)
+#define stackblock (FRAMESIZE+FRAME_PARM_SAVE) /* offset to parm save area. */
+#endif
.text
ENTRY(__socket)
@@ -98,22 +103,22 @@ ENTRY(__socket)
.Lsocket_cancel:
cfi_adjust_cfa_offset(FRAMESIZE)
mflr r9
- std r9,FRAMESIZE+16(r1)
- cfi_offset (lr, 16)
+ std r9,FRAMESIZE+FRAME_LR_SAVE(r1)
+ cfi_offset (lr, FRAME_LR_SAVE)
CENABLE
- std r3,120(r1)
+ std r3,FRAME_MIN_SIZE+8(r1)
li r3,P(SOCKOP_,socket)
addi r4,r1,stackblock
DO_CALL(SYS_ify(socketcall))
mfcr r0
- std r3,112(r1)
- std r0,FRAMESIZE+8(r1)
- cfi_offset (cr, 8)
- ld r3,120(r1)
+ std r3,FRAME_MIN_SIZE(r1)
+ std r0,FRAMESIZE+FRAME_CR_SAVE(r1)
+ cfi_offset (cr, FRAME_CR_SAVE)
+ ld r3,FRAME_MIN_SIZE+8(r1)
CDISABLE
- ld r4,FRAMESIZE+16(r1)
- ld r0,FRAMESIZE+8(r1)
- ld r3,112(r1)
+ ld r4,FRAMESIZE+FRAME_LR_SAVE(r1)
+ ld r0,FRAMESIZE+FRAME_CR_SAVE(r1)
+ ld r3,FRAME_MIN_SIZE(r1)
mtlr r4
mtcr r0
addi r1,r1,FRAMESIZE
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
index d7f63426b..1d92eb456 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
@@ -1,5 +1,5 @@
/* Save current context and install the given one.
- Copyright (C) 2002-2013 Free Software Foundation, Inc.
+ Copyright (C) 2002-2014 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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
index 8d35ec8e4..ed68705aa 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c
@@ -1,5 +1,5 @@
/* Selective file content synch'ing.
- Copyright (C) 2006-2013 Free Software Foundation, Inc.
+ Copyright (C) 2006-2014 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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index 6ebab742c..9c456101a 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2014 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
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym
index a35418d9d..8364e4614 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym
@@ -8,27 +8,6 @@ SIG_BLOCK
SIG_SETMASK
--- Offsets of the fields in the powerpc64 ABI stack frame.
--- XXX Do these correspond to some struct?
-
-FRAME_BACKCHAIN 0
-FRAME_CR_SAVE 8
-FRAME_LR_SAVE 16
-FRAME_COMPILER_DW 24
-FRAME_LINKER_DW 32
-FRAME_TOC_SAVE 40
-FRAME_PARM_SAVE 48
-FRAME_PARM1_SAVE 48
-FRAME_PARM2_SAVE 56
-FRAME_PARM3_SAVE 64
-FRAME_PARM4_SAVE 72
-FRAME_PARM5_SAVE 80
-FRAME_PARM6_SAVE 88
-FRAME_PARM7_SAVE 96
-FRAME_PARM8_SAVE 104
-FRAME_PARM9_SAVE 112
-
-
-- Offsets of the fields in the ucontext_t structure.
#define ucontext(member) offsetof (ucontext_t, member)
#define mcontext(member) ucontext (uc_mcontext.member)
diff --git a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
index aed224621..ebffc4c5a 100644
--- a/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
+++ b/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2014 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