diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
190 files changed, 2036 insertions, 1989 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/Implies b/sysdeps/unix/sysv/linux/powerpc/Implies new file mode 100644 index 0000000000..466b7f4b4a --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/Implies @@ -0,0 +1 @@ +powerpc/nptl diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile index 395342f150..c89ed9ec7d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Makefile +++ b/sysdeps/unix/sysv/linux/powerpc/Makefile @@ -3,10 +3,8 @@ abi-32-options := -U__powerpc64__ abi-32-condition := __WORDSIZE == 32 abi-64-v1-options := -D__powerpc64__ -U_CALL_ELF -D_CALL_ELF=1 abi-64-v1-condition := __WORDSIZE == 64 && _CALL_ELF != 2 -abi-64-v1-ld-soname := ld64.so.1 abi-64-v2-options := -D__powerpc64__ -U_CALL_ELF -D_CALL_ELF=2 abi-64-v2-condition := __WORDSIZE == 64 && _CALL_ELF == 2 -abi-64-v2-ld-soname := ld64.so.2 ifeq ($(subdir),rt) librt-routines += rt-sysdep @@ -21,9 +19,9 @@ sysdep_routines += dl-vdso ifeq ($(build-shared),yes) # This is needed for DSO loading from static binaries. sysdep-dl-routines += dl-static -sysdep_routines += dl-static -sysdep-rtld-routines += dl-static endif +# Otherwise tst-tls-dlinfo fails due to tst-tlsmod2.so using static tls. +LDFLAGS-tst-tlsmod2.so += -Wl,--no-tls-get-addr-optimize endif ifeq ($(subdir),misc) @@ -31,3 +29,9 @@ sysdep_headers += bits/ppc.h sysdep_routines += get_timebase_freq tests += test-gettimebasefreq endif + +ifeq ($(subdir),nptl) +libpthread-routines += sysdep +libpthread-sysdep_routines += elision-lock elision-unlock elision-timed \ + elision-trylock +endif diff --git a/sysdeps/unix/sysv/linux/powerpc/arch-fork.h b/sysdeps/unix/sysv/linux/powerpc/arch-fork.h new file mode 100644 index 0000000000..5f945378ee --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/arch-fork.h @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/i386/arch-fork.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/environments.h b/sysdeps/unix/sysv/linux/powerpc/bits/environments.h index 475ce8b4dc..943ef765be 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/environments.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/environments.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1999-2014 Free Software Foundation, Inc. +/* Copyright (C) 1999-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h index 2523ed15b2..b276320a3b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h @@ -1,5 +1,5 @@ /* O_*, F_*, FD_* bit values for Linux/PowerPC. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h b/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h index 87b8265afd..77990436b0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ioctl-types.h @@ -1,5 +1,77 @@ +/* Structure types for pre-termios terminal ioctls. Linux/powerpc version. + Copyright (C) 2014-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + #ifndef _SYS_IOCTL_H # error "Never use <bits/ioctl-types.h> directly; include <sys/ioctl.h> instead." #endif -#include <termios.h> +/* Get definition of constants for use with `ioctl'. */ +#include <asm/ioctls.h> + + +struct winsize + { + unsigned short int ws_row; + unsigned short int ws_col; + unsigned short int ws_xpixel; + unsigned short int ws_ypixel; + }; + +#define NCC 10 +struct termio + { + unsigned short int c_iflag; /* input mode flags */ + unsigned short int c_oflag; /* output mode flags */ + unsigned short int c_cflag; /* control mode flags */ + unsigned short int c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + +/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ + +/* line disciplines */ +#define N_TTY 0 +#define N_SLIP 1 +#define N_MOUSE 2 +#define N_PPP 3 +#define N_STRIP 4 +#define N_AX25 5 +#define N_X25 6 /* X.25 async */ +#define N_6PACK 7 +#define N_MASC 8 /* Mobitex module */ +#define N_R3964 9 /* Simatic R3964 module */ +#define N_PROFIBUS_FDL 10 /* Profibus */ +#define N_IRDA 11 /* Linux IR */ +#define N_SMSBLOCK 12 /* SMS block mode */ +#define N_HDLC 13 /* synchronous HDLC */ +#define N_SYNC_PPP 14 /* synchronous PPP */ +#define N_HCI 15 /* Bluetooth HCI UART */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h b/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h index c9c2e2a06b..e9b5106966 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2014 Free Software Foundation, Inc. +/* Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h b/sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h new file mode 100644 index 0000000000..da3180bb86 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h @@ -0,0 +1,100 @@ +/* Minimum guaranteed maximum values for system limits. Linux/PPC version. + Copyright (C) 1993-2015 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; see the file COPYING.LIB. If + not, see <http://www.gnu.org/licenses/>. */ + +/* The kernel header pollutes the namespace with the NR_OPEN symbol + and defines LINK_MAX although filesystems have different maxima. A + similar thing is true for OPEN_MAX: the limit can be changed at + runtime and therefore the macro must not be defined. Remove this + after including the header if necessary. */ +#ifndef NR_OPEN +# define __undef_NR_OPEN +#endif +#ifndef LINK_MAX +# define __undef_LINK_MAX +#endif +#ifndef OPEN_MAX +# define __undef_OPEN_MAX +#endif +#ifndef ARG_MAX +# define __undef_ARG_MAX +#endif + +/* The kernel sources contain a file with all the needed information. */ +#include <linux/limits.h> + +/* Have to remove NR_OPEN? */ +#ifdef __undef_NR_OPEN +# undef NR_OPEN +# undef __undef_NR_OPEN +#endif +/* Have to remove LINK_MAX? */ +#ifdef __undef_LINK_MAX +# undef LINK_MAX +# undef __undef_LINK_MAX +#endif +/* Have to remove OPEN_MAX? */ +#ifdef __undef_OPEN_MAX +# undef OPEN_MAX +# undef __undef_OPEN_MAX +#endif +/* Have to remove ARG_MAX? */ +#ifdef __undef_ARG_MAX +# undef ARG_MAX +# undef __undef_ARG_MAX +#endif + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 +/* This is the value this implementation supports. */ +#define PTHREAD_KEYS_MAX 1024 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 +/* Number of iterations this implementation does. */ +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 +/* We have no predefined limit on the number of threads. */ +#undef PTHREAD_THREADS_MAX + +/* Maximum amount by which a process can descrease its asynchronous I/O + priority level. */ +#define AIO_PRIO_DELTA_MAX 20 + +/* Minimum size for a thread. At least two pages for systems with 64k + pages. */ +#define PTHREAD_STACK_MIN 131072 + +/* Maximum number of timer expiration overruns. */ +#define DELAYTIMER_MAX 2147483647 + +/* Maximum tty name length. */ +#define TTY_NAME_MAX 32 + +/* Maximum login name length. This is arbitrary. */ +#define LOGIN_NAME_MAX 256 + +/* Maximum host name length. */ +#define HOST_NAME_MAX 64 + +/* Maximum message queue priority level. */ +#define MQ_PRIO_MAX 32768 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h index a2a0fafee7..86464c82a2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/PowerPC version. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/msq.h b/sysdeps/unix/sysv/linux/powerpc/bits/msq.h index da686c85dc..09f65ce5da 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/msq.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/msq.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2014 Free Software Foundation, Inc. +/* Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h b/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h index e9e8a9b2cf..1c46f7bc8f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h @@ -1,5 +1,5 @@ /* Facilities specific to the PowerPC architecture on Linux - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h new file mode 100644 index 0000000000..7cbdb2cb77 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -0,0 +1,236 @@ +/* Machine-specific pthread type layouts. PowerPC version. + Copyright (C) 2003-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_H +#define _BITS_PTHREADTYPES_H 1 + +#include <bits/wordsize.h> + +#if __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 32 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#else +# define __SIZEOF_PTHREAD_ATTR_T 36 +# define __SIZEOF_PTHREAD_MUTEX_T 24 +# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +# define __SIZEOF_PTHREAD_COND_T 48 +# define __SIZEOF_PTHREAD_CONDATTR_T 4 +# define __SIZEOF_PTHREAD_RWLOCK_T 32 +# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +# define __SIZEOF_PTHREAD_BARRIER_T 20 +# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#endif + + +/* Thread identifiers. The structure of the attribute type is + deliberately not exposed. */ +typedef unsigned long int pthread_t; + + +union pthread_attr_t +{ + char __size[__SIZEOF_PTHREAD_ATTR_T]; + long int __align; +}; +#ifndef __have_pthread_attr_t +typedef union pthread_attr_t pthread_attr_t; +# define __have_pthread_attr_t 1 +#endif + + +#if __WORDSIZE == 64 +typedef struct __pthread_internal_list +{ + struct __pthread_internal_list *__prev; + struct __pthread_internal_list *__next; +} __pthread_list_t; +#else +typedef struct __pthread_internal_slist +{ + struct __pthread_internal_slist *__next; +} __pthread_slist_t; +#endif + + +/* Data structures for mutex handling. The structure of the attribute + type is deliberately not exposed. */ +typedef union +{ + struct __pthread_mutex_s + { + int __lock; + unsigned int __count; + int __owner; +#if __WORDSIZE == 64 + unsigned int __nusers; +#endif + /* KIND must stay at this position in the structure to maintain + binary compatibility. */ + int __kind; +#if __WORDSIZE == 64 + short __spins; + short __elision; + __pthread_list_t __list; +# define __PTHREAD_MUTEX_HAVE_PREV 1 +# define __PTHREAD_SPINS 0, 0 +#else + unsigned int __nusers; + __extension__ union + { + struct + { + short __espins; + short __elision; +# define __spins __elision_data.__espins +# define __elision __elision_data.__elision +# define __PTHREAD_SPINS { 0, 0 } + } __elision_data; + __pthread_slist_t __list; + }; +#endif + } __data; + char __size[__SIZEOF_PTHREAD_MUTEX_T]; + long int __align; +} pthread_mutex_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; + int __align; +} pthread_mutexattr_t; + + +/* Data structure for conditional variable handling. The structure of + the attribute type is deliberately not exposed. */ +typedef union +{ + struct + { + int __lock; + unsigned int __futex; + __extension__ unsigned long long int __total_seq; + __extension__ unsigned long long int __wakeup_seq; + __extension__ unsigned long long int __woken_seq; + void *__mutex; + unsigned int __nwaiters; + unsigned int __broadcast_seq; + } __data; + char __size[__SIZEOF_PTHREAD_COND_T]; + __extension__ long long int __align; +} pthread_cond_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_CONDATTR_T]; + int __align; +} pthread_condattr_t; + + +/* Keys for thread-specific data */ +typedef unsigned int pthread_key_t; + + +/* Once-only execution */ +typedef int pthread_once_t; + + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K +/* Data structure for read-write lock variable handling. The + structure of the attribute type is deliberately not exposed. */ +typedef union +{ +# if __WORDSIZE == 64 + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + int __writer; + int __shared; + unsigned char __rwelision; + unsigned char __pad1[7]; + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 } + } __data; +# else + struct + { + int __lock; + unsigned int __nr_readers; + unsigned int __readers_wakeup; + unsigned int __writer_wakeup; + unsigned int __nr_readers_queued; + unsigned int __nr_writers_queued; + unsigned char __rwelision; + unsigned char __pad2; + unsigned char __shared; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + int __writer; +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + } __data; +# endif + char __size[__SIZEOF_PTHREAD_RWLOCK_T]; + long int __align; +} pthread_rwlock_t; + + +typedef union +{ + char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; + long int __align; +} pthread_rwlockattr_t; +#endif + + +#ifdef __USE_XOPEN2K +/* POSIX spinlock data type. */ +typedef volatile int pthread_spinlock_t; + + +/* POSIX barriers data type. The structure of the type is + deliberately not exposed. */ +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIER_T]; + long int __align; +} pthread_barrier_t; + +typedef union +{ + char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; + int __align; +} pthread_barrierattr_t; +#endif + + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/sem.h b/sysdeps/unix/sysv/linux/powerpc/bits/sem.h index 783135dc25..19ad16e12e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/sem.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/sem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2014 Free Software Foundation, Inc. +/* Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h b/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h new file mode 100644 index 0000000000..172e645812 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h @@ -0,0 +1,40 @@ +/* Machine-specific POSIX semaphore type layouts. PowerPC version. + Copyright (C) 2003-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _SEMAPHORE_H +# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead." +#endif + +#include <bits/wordsize.h> + +#if __WORDSIZE == 64 +# define __SIZEOF_SEM_T 32 +#else +# define __SIZEOF_SEM_T 16 +#endif + +/* Value returned if `sem_open' failed. */ +#define SEM_FAILED ((sem_t *) 0) + + +typedef union +{ + char __size[__SIZEOF_SEM_T]; + long int __align; +} sem_t; diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h index df94d7697d..306aa24d9c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2014 Free Software Foundation, Inc. +/* Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h index 92790def19..989d1a2d19 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h @@ -1,5 +1,5 @@ /* sigstack, sigaltstack definitions. - Copyright (C) 1998-2014 Free Software Foundation, Inc. + Copyright (C) 1998-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/stat.h b/sysdeps/unix/sysv/linux/powerpc/bits/stat.h index 1325594e2d..45f0c00484 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/stat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 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 @@ -70,7 +70,7 @@ struct stat # else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif -# if defined __USE_MISC || defined __USE_XOPEN2K8 +# ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -110,7 +110,7 @@ struct stat64 __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -# if defined __USE_MISC || defined __USE_XOPEN2K8 +# ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -164,7 +164,7 @@ struct stat # else __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif -# if defined __USE_MISC || defined __USE_XOPEN2K8 +# ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the @@ -204,7 +204,7 @@ struct stat64 __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ -# if defined __USE_MISC || defined __USE_XOPEN2K8 +# ifdef __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h index d5dbdaa579..ce19a04bbe 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 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 @@ -95,8 +95,10 @@ struct termios { # define NLDLY 00001400 # define NL0 00000000 # define NL1 00000400 -# define NL2 00001000 -# define NL3 00001400 +# if defined __USE_MISC +# define NL2 00001000 +# define NL3 00001400 +# endif # define TABDLY 00006000 # define TAB0 00000000 # define TAB1 00002000 @@ -202,7 +204,7 @@ struct termios { # define PENDIN 0x20000000 #endif #define IEXTEN 0x00000400 -#ifdef __USE_BSD +#ifdef __USE_MISC # define EXTPROC 0x10000000 #endif @@ -222,6 +224,8 @@ struct termios { #define TCSADRAIN 1 #define TCSAFLUSH 2 +#ifdef __USE_MISC + struct sgttyb { char sg_ispeed; char sg_ospeed; @@ -257,23 +261,6 @@ struct ltchars { #define TIOCPKT_NOSTOP 16 #define TIOCPKT_DOSTOP 32 -struct winsize { - unsigned short ws_row; - unsigned short ws_col; - unsigned short ws_xpixel; - unsigned short ws_ypixel; -}; - -#define NCC 10 -struct termio { - unsigned short c_iflag; /* input mode flags */ - unsigned short c_oflag; /* output mode flags */ - unsigned short c_cflag; /* control mode flags */ - unsigned short c_lflag; /* local mode flags */ - unsigned char c_line; /* line discipline */ - unsigned char c_cc[NCC]; /* control characters */ -}; - /* c_cc characters */ #define _VINTR 0 #define _VQUIT 1 @@ -286,36 +273,7 @@ struct termio { #define _VEOL2 8 #define _VSWTC 9 -/* modem lines */ -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG - /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ -/* line disciplines */ -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6 /* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8 /* Mobitex module */ -#define N_R3964 9 /* Simatic R3964 module */ -#define N_PROFIBUS_FDL 10 /* Profibus */ -#define N_IRDA 11 /* Linux IR */ -#define N_SMSBLOCK 12 /* SMS block mode */ -#define N_HDLC 13 /* synchronous HDLC */ -#define N_SYNC_PPP 14 /* synchronous PPP */ -#define N_HCI 15 /* Bluetooth HCI UART */ +#endif /* __USE_MISC */ diff --git a/sysdeps/unix/sysv/linux/powerpc/chown.c b/sysdeps/unix/sysv/linux/powerpc/chown.c deleted file mode 100644 index cabca011bd..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/chown.c +++ /dev/null @@ -1,45 +0,0 @@ -/* chown() compatibility. - Copyright (C) 1998-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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <string.h> -#include <unistd.h> -#include <limits.h> -#include <sysdep.h> -#include <stdlib.h> - -#include <kernel-features.h> - -/* Consider moving to syscalls.list. */ - -/* - In Linux 2.1.x the chown functions have been changed. A new function lchown - was introduced. The new chown now follows symlinks - the old chown and the - new lchown do not follow symlinks. - This file emulates chown() under the old kernels. -*/ - -int -__chown (const char *file, uid_t owner, gid_t group) -{ - return INLINE_SYSCALL (chown, 3, file, owner, group); -} -libc_hidden_def (__chown) - -#include <shlib-compat.h> -versioned_symbol (libc, __chown, chown, GLIBC_2_1); diff --git a/sysdeps/unix/sysv/linux/powerpc/configure b/sysdeps/unix/sysv/linux/powerpc/configure index 50e3639be5..6f883de396 100644 --- a/sysdeps/unix/sysv/linux/powerpc/configure +++ b/sysdeps/unix/sysv/linux/powerpc/configure @@ -75,3 +75,5 @@ $as_echo "$libc_cv_mabi_ibmlongdouble" >&6; } as_fn_error $? "this configuration requires -mlong-double-128 IBM extended format support" "$LINENO" 5 fi fi + +ldd_rewrite_script=sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/powerpc/configure.ac b/sysdeps/unix/sysv/linux/powerpc/configure.ac index 1768ab1f99..b8e5f9ac32 100644 --- a/sysdeps/unix/sysv/linux/powerpc/configure.ac +++ b/sysdeps/unix/sysv/linux/powerpc/configure.ac @@ -35,3 +35,5 @@ long double foobar (long double x) { return x; }], AC_MSG_ERROR([this configuration requires -mlong-double-128 IBM extended format support]) fi fi + +ldd_rewrite_script=sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-static.c b/sysdeps/unix/sysv/linux/powerpc/dl-static.c index 4d31a56dd6..a40d14b1d9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/dl-static.c +++ b/sysdeps/unix/sysv/linux/powerpc/dl-static.c @@ -1,5 +1,5 @@ /* Variable initialization. PowerPC version. - Copyright (C) 2013-2014 Free Software Foundation, Inc. + Copyright (C) 2013-2015 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/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c index 354c4e0a49..c2504ff17e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c +++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c @@ -1,5 +1,5 @@ /* Operating system support for run-time dynamic linker. Linux/PPC version. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <config.h> -#include <kernel-features.h> #include <ldsodefs.h> int __cache_line_size attribute_hidden; diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c new file mode 100644 index 0000000000..53412227c9 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c @@ -0,0 +1,83 @@ +/* elision-conf.c: Lock elision tunable parameters. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include "config.h" +#include <pthreadP.h> +#include <elision-conf.h> +#include <unistd.h> +#include <dl-procinfo.h> + +/* Reasonable initial tuning values, may be revised in the future. + This is a conservative initial value. */ + +struct elision_config __elision_aconf = + { + /* How many times to use a non-transactional lock after a transactional + failure has occurred because the lock is already acquired. Expressed + in number of lock acquisition attempts. */ + .skip_lock_busy = 3, + /* How often to not attempt to use elision if a transaction aborted due + to reasons other than other threads' memory accesses. Expressed in + number of lock acquisition attempts. */ + .skip_lock_internal_abort = 3, + /* How often to not attempt to use elision if a lock used up all retries + without success. Expressed in number of lock acquisition attempts. */ + .skip_lock_out_of_tbegin_retries = 3, + /* How often we retry using elision if there is chance for the transaction + to finish execution (e.g., it wasn't aborted due to the lock being + already acquired. */ + .try_tbegin = 3, + /* Same as SKIP_LOCK_INTERNAL_ABORT but for trylock. */ + .skip_trylock_internal_abort = 3, + }; + +/* Force elision for all new locks. This is used to decide whether existing + DEFAULT locks should be automatically use elision in pthread_mutex_lock(). + Disabled for suid programs. Only used when elision is available. */ + +int __pthread_force_elision attribute_hidden; + +/* Initialize elision. */ + +static void +elision_init (int argc __attribute__ ((unused)), + char **argv __attribute__ ((unused)), + char **environ) +{ +#ifdef ENABLE_LOCK_ELISION + int elision_available = (GLRO (dl_hwcap2) & PPC_FEATURE2_HAS_HTM) ? 1 : 0; + __pthread_force_elision = __libc_enable_secure ? 0 : elision_available; +#endif + if (!__pthread_force_elision) + /* Disable elision on rwlocks. */ + __elision_aconf.try_tbegin = 0; +} + +#ifdef SHARED +# define INIT_SECTION ".init_array" +# define MAYBE_CONST +#else +# define INIT_SECTION ".preinit_array" +# define MAYBE_CONST const +#endif + +void (*MAYBE_CONST __pthread_init_array []) (int, char **, char **) + __attribute__ ((section (INIT_SECTION), aligned (sizeof (void *)))) = +{ + &elision_init +}; diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.h b/sysdeps/unix/sysv/linux/powerpc/elision-conf.h new file mode 100644 index 0000000000..72371f1ba7 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.h @@ -0,0 +1,42 @@ +/* elision-conf.h: Lock elision tunable parameters. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _ELISION_CONF_H +#define _ELISION_CONF_H 1 + +#include <pthread.h> +#include <time.h> + +/* Should make sure there is no false sharing on this. */ +struct elision_config +{ + int skip_lock_busy; + int skip_lock_internal_abort; + int skip_lock_out_of_tbegin_retries; + int try_tbegin; + int skip_trylock_internal_abort; +} __attribute__ ((__aligned__ (128))); + +extern struct elision_config __elision_aconf attribute_hidden; + +extern int __pthread_force_elision attribute_hidden; + +/* Tell the test suite to test elision for this architecture. */ +#define HAVE_ELISION 1 + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-lock.c b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c new file mode 100644 index 0000000000..7f9bcc2bf1 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/elision-lock.c @@ -0,0 +1,107 @@ +/* elision-lock.c: Elided pthread mutex lock. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <stdio.h> +#include <pthread.h> +#include <pthreadP.h> +#include <lowlevellock.h> +#include <elision-conf.h> +#include "htm.h" + +/* PowerISA 2.0.7 Section B.5.5 defines isync to be insufficient as a + barrier in acquire mechanism for HTM operations, a strong 'sync' is + required. */ +#undef __arch_compare_and_exchange_val_32_acq +#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ + ({ \ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ + "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ + " stwcx. %3,0,%1\n" \ + " bne- 1b\n" \ + "2: sync" \ + : "=&r" (__tmp) \ + : "b" (__memp), "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) + +#if !defined(LLL_LOCK) && !defined(EXTRAARG) +/* Make sure the configuration code is always linked in for static + libraries. */ +#include "elision-conf.c" +#endif + +#ifndef EXTRAARG +# define EXTRAARG +#endif +#ifndef LLL_LOCK +# define LLL_LOCK(a,b) lll_lock(a,b), 0 +#endif + +#define aconf __elision_aconf + +/* Adaptive lock using transactions. + By default the lock region is run as a transaction, and when it + aborts or the lock is busy the lock adapts itself. */ + +int +__lll_lock_elision (int *lock, short *adapt_count, EXTRAARG int pshared) +{ + if (*adapt_count > 0) + { + (*adapt_count)--; + goto use_lock; + } + + int try_begin = aconf.try_tbegin; + while (1) + { + if (__builtin_tbegin (0)) + { + if (*lock == 0) + return 0; + /* Lock was busy. Fall back to normal locking. */ + __builtin_tabort (_ABORT_LOCK_BUSY); + } + else + { + /* A persistent failure indicates that a retry will probably + result in another failure. Use normal locking now and + for the next couple of calls. */ + if (try_begin-- <= 0 + || _TEXASRU_FAILURE_PERSISTENT (__builtin_get_texasru ())) + { + if (aconf.skip_lock_internal_abort > 0) + *adapt_count = aconf.skip_lock_internal_abort; + goto use_lock; + } + /* Same logic as above, but for for a number of temporary failures + in a row. */ + else if (aconf.skip_lock_out_of_tbegin_retries > 0 + && aconf.try_tbegin > 0) + *adapt_count = aconf.skip_lock_out_of_tbegin_retries; + } + } + +use_lock: + return LLL_LOCK ((*lock), pshared); +} diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-timed.c b/sysdeps/unix/sysv/linux/powerpc/elision-timed.c new file mode 100644 index 0000000000..48eae8f7fc --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/elision-timed.c @@ -0,0 +1,28 @@ +/* elision-timed.c: Lock elision timed lock. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <time.h> +#include <elision-conf.h> +#include "lowlevellock.h" + +#define __lll_lock_elision __lll_timedlock_elision +#define EXTRAARG const struct timespec *t, +#undef LLL_LOCK +#define LLL_LOCK(a, b) lll_timedlock(a, t, b) + +#include "elision-lock.c" diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c new file mode 100644 index 0000000000..7b6d1b9b98 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/elision-trylock.c @@ -0,0 +1,68 @@ +/* elision-trylock.c: Lock eliding trylock for pthreads. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <pthread.h> +#include <pthreadP.h> +#include <lowlevellock.h> +#include <elision-conf.h> +#include "htm.h" + +#define aconf __elision_aconf + +/* Try to elide a futex trylock. FUTEX is the futex variable. ADAPT_COUNT is + the adaptation counter in the mutex. */ + +int +__lll_trylock_elision (int *futex, short *adapt_count) +{ + /* Implement POSIX semantics by forbiding nesting elided trylocks. */ + __builtin_tabort (_ABORT_NESTED_TRYLOCK); + + /* Only try a transaction if it's worth it. */ + if (*adapt_count > 0) + { + (*adapt_count)--; + goto use_lock; + } + + if (__builtin_tbegin (0)) + { + if (*futex == 0) + return 0; + + /* Lock was busy. Fall back to normal locking. */ + __builtin_tabort (_ABORT_LOCK_BUSY); + } + else + { + if (_TEXASRU_FAILURE_PERSISTENT (__builtin_get_texasru ())) + { + /* A persistent failure indicates that a retry will probably + result in another failure. Use normal locking now and + for the next couple of calls. */ + if (aconf.skip_trylock_internal_abort > 0) + *adapt_count = aconf.skip_trylock_internal_abort; + } + + if (aconf.skip_lock_busy > 0) + *adapt_count = aconf.skip_lock_busy; + } + +use_lock: + return lll_trylock (*futex); +} diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c new file mode 100644 index 0000000000..f04c339383 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/elision-unlock.c @@ -0,0 +1,32 @@ +/* elision-unlock.c: Commit an elided pthread lock. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include "pthreadP.h" +#include "lowlevellock.h" +#include "htm.h" + +int +__lll_unlock_elision(int *lock, int pshared) +{ + /* When the lock was free we're in a transaction. */ + if (*lock == 0) + __builtin_tend (0); + else + lll_unlock ((*lock), pshared); + return 0; +} diff --git a/sysdeps/unix/sysv/linux/powerpc/fchownat.c b/sysdeps/unix/sysv/linux/powerpc/fchownat.c deleted file mode 100644 index 61e0a4dc56..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/fchownat.c +++ /dev/null @@ -1,105 +0,0 @@ -/* 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <fcntl.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include <limits.h> -#include <sysdep.h> -#include <stdlib.h> - -#include <kernel-features.h> - -/* - In Linux 2.1.x the chown functions have been changed. A new function lchown - was introduced. The new chown now follows symlinks - the old chown and the - new lchown do not follow symlinks. - This file emulates chown() under the old kernels. -*/ - -int -fchownat (int fd, const char *file, uid_t owner, gid_t group, int flag) -{ - int result; - -#ifdef __NR_fchownat -# ifndef __ASSUME_ATFCTS - if (__have_atfcts >= 0) -# endif - { - result = INLINE_SYSCALL (fchownat, 5, fd, file, owner, group, flag); -# ifndef __ASSUME_ATFCTS - if (result == -1 && errno == ENOSYS) - __have_atfcts = -1; - else -# endif - return result; - } -#endif - -#ifndef __ASSUME_ATFCTS - if (flag & ~AT_SYMLINK_NOFOLLOW) - { - __set_errno (EINVAL); - return -1; - } - - char *buf = NULL; - - if (fd != AT_FDCWD && file[0] != '/') - { - size_t filelen = strlen (file); - if (__builtin_expect (filelen == 0, 0)) - { - __set_errno (ENOENT); - return -1; - } - - static const char procfd[] = "/proc/self/fd/%d/%s"; - /* Buffer for the path name we are going to use. It consists of - - the string /proc/self/fd/ - - the file descriptor number - - the file name provided. - The final NUL is included in the sizeof. A bit of overhead - due to the format elements compensates for possible negative - numbers. */ - size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen; - buf = alloca (buflen); - - __snprintf (buf, buflen, procfd, fd, file); - file = buf; - } - - INTERNAL_SYSCALL_DECL (err); - - if (flag & AT_SYMLINK_NOFOLLOW) - result = INTERNAL_SYSCALL (lchown, err, 3, file, owner, group); - else - result = INTERNAL_SYSCALL (chown, err, 3, file, owner, group); - - if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 0)) - { - __atfct_seterrno (INTERNAL_SYSCALL_ERRNO (result, err), fd, buf); - return -1; - } - - return result; - -#endif -} diff --git a/sysdeps/unix/sysv/linux/powerpc/lchown.S b/sysdeps/unix/sysv/linux/powerpc/force-elision.h index 17857486a4..f8a52a0ac0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/lchown.S +++ b/sysdeps/unix/sysv/linux/powerpc/force-elision.h @@ -1,5 +1,5 @@ -/* lchown system call. - Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* force-elision.h: Automatic enabling of elision for mutexes + Copyright (C) 2015 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 @@ -16,23 +16,13 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -/* Some old kernel headers call lchown() 'chown'. The number is - the same. */ - -#include <sysdep.h> - -#ifdef __NR_lchown - PSEUDO (__lchown, lchown, 3) -#else - PSEUDO (__lchown, chown, 3) -#endif - ret - PSEUDO_END(__lchown) - weak_alias (__lchown, lchown) - -#ifdef SHARED -#include <shlib-compat.h> -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) -compat_symbol (libc, __lchown, chown, GLIBC_2_0) -# endif +#ifdef ENABLE_LOCK_ELISION +/* Automatically enable elision for existing user lock kinds. */ +#define FORCE_ELISION(m, s) \ + if (__pthread_force_elision \ + && (m->__data.__kind & PTHREAD_MUTEX_ELISION_FLAGS_NP) == 0) \ + { \ + mutex->__data.__kind |= PTHREAD_MUTEX_ELISION_NP; \ + s; \ + } #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c index 0a6aa81fb0..3578ea8f6d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c +++ b/sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c @@ -1,5 +1,5 @@ /* Get frequency of the system processor. powerpc/Linux version. - Copyright (C) 2000-2014 Free Software Foundation, Inc. + Copyright (C) 2000-2015 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 @@ -18,100 +18,91 @@ #include <ctype.h> #include <fcntl.h> +#include <stdint.h> #include <string.h> #include <unistd.h> #include <libc-internal.h> #include <sysdep.h> -#include <bits/libc-vdso.h> +#include <libc-vdso.h> +#include <not-cancel.h> hp_timing_t __get_clockfreq (void) { + hp_timing_t result = 0L; + +#ifdef SHARED + /* The vDSO does not return an error (it clear cr0.so on returning). */ + INTERNAL_SYSCALL_DECL (err); + result = + INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK (get_tbfreq, err, uint64_t, 0); +#else /* We read the information from the /proc filesystem. /proc/cpuinfo contains at least one line like: timebase : 33333333 We search for this line and convert the number into an integer. */ - static hp_timing_t timebase_freq; - hp_timing_t result = 0L; + int fd = open_not_cancel_2 ("/proc/cpuinfo", O_RDONLY); + if (__glibc_likely (fd != -1)) + return result; - /* If this function was called before, we know the result. */ - if (timebase_freq != 0) - return timebase_freq; + /* The timebase will be in the 1st 1024 bytes for systems with up + to 8 processors. If the first read returns less then 1024 + bytes read, we have the whole cpuinfo and can start the scan. + Otherwise we will have to read more to insure we have the + timebase value in the scan. */ + char buf[1024]; + ssize_t n; - /* If we can use the vDSO to obtain the timebase even better. */ -#ifdef SHARED - INTERNAL_SYSCALL_DECL (err); - timebase_freq = - INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK (get_tbfreq, err, hp_timing_t, 0); - if (INTERNAL_SYSCALL_ERROR_P (timebase_freq, err) - && INTERNAL_SYSCALL_ERRNO (timebase_freq, err) == ENOSYS) -#endif + n = __read_nocancel (fd, buf, sizeof (buf)); + if (n == sizeof (buf)) { - int fd = __open ("/proc/cpuinfo", O_RDONLY); + /* We are here because the 1st read returned exactly sizeof + (buf) bytes. This implies that we are not at EOF and may + not have read the timebase value yet. So we need to read + more bytes until we know we have EOF. We copy the lower + half of buf to the upper half and read sizeof (buf)/2 + bytes into the lower half of buf and repeat until we + reach EOF. We can assume that the timebase will be in + the last 512 bytes of cpuinfo, so two 512 byte half_bufs + will be sufficient to contain the timebase and will + handle the case where the timebase spans the half_buf + boundry. */ + const ssize_t half_buf = sizeof (buf) / 2; + while (n >= half_buf) + { + memcpy (buf, buf + half_buf, half_buf); + n = __read_nocancel (fd, buf + half_buf, half_buf); + } + if (n >= 0) + n += half_buf; + } + __close_nocancel (fd); - if (__builtin_expect (fd != -1, 1)) + if (__glibc_likely (n > 0)) + { + char *mhz = memmem (buf, n, "timebase", 7); + + if (__glibc_likely (mhz != NULL)) { - /* The timebase will be in the 1st 1024 bytes for systems with up - to 8 processors. If the first read returns less then 1024 - bytes read, we have the whole cpuinfo and can start the scan. - Otherwise we will have to read more to insure we have the - timebase value in the scan. */ - char buf[1024]; - ssize_t n; + char *endp = buf + n; - n = __read (fd, buf, sizeof (buf)); - if (n == sizeof (buf)) - { - /* We are here because the 1st read returned exactly sizeof - (buf) bytes. This implies that we are not at EOF and may - not have read the timebase value yet. So we need to read - more bytes until we know we have EOF. We copy the lower - half of buf to the upper half and read sizeof (buf)/2 - bytes into the lower half of buf and repeat until we - reach EOF. We can assume that the timebase will be in - the last 512 bytes of cpuinfo, so two 512 byte half_bufs - will be sufficient to contain the timebase and will - handle the case where the timebase spans the half_buf - boundry. */ - const ssize_t half_buf = sizeof (buf) / 2; - while (n >= half_buf) - { - memcpy (buf, buf + half_buf, half_buf); - n = __read (fd, buf + half_buf, half_buf); - } - if (n >= 0) - n += half_buf; - } + /* Search for the beginning of the string. */ + while (mhz < endp && (*mhz < '0' || *mhz > '9') && *mhz != '\n') + ++mhz; - if (__builtin_expect (n, 1) > 0) + while (mhz < endp && *mhz != '\n') { - char *mhz = memmem (buf, n, "timebase", 7); - - if (__builtin_expect (mhz != NULL, 1)) + if (*mhz >= '0' && *mhz <= '9') { - char *endp = buf + n; - - /* Search for the beginning of the string. */ - while (mhz < endp && (*mhz < '0' || *mhz > '9') - && *mhz != '\n') - ++mhz; - - while (mhz < endp && *mhz != '\n') - { - if (*mhz >= '0' && *mhz <= '9') - { - result *= 10; - result += *mhz - '0'; - } - - ++mhz; - } + result *= 10; + result += *mhz - '0'; } - timebase_freq = result; + + ++mhz; } - __close (fd); } } +#endif - return timebase_freq; + return result; } diff --git a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c index 94f05858f9..86de3d6ab4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c +++ b/sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c @@ -1,5 +1,5 @@ /* Get the frequency of the time base. - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 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/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c index 97ea2a4a70..f561ac7d15 100644 --- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c +++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005-2014 Free Software Foundation, Inc. +/* Copyright (C) 2005-2015 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,7 +21,7 @@ #ifdef SHARED # include <dl-vdso.h> -# include <bits/libc-vdso.h> +# include <libc-vdso.h> # include <dl-machine.h> void *gettimeofday_ifunc (void) __asm__ ("__gettimeofday"); diff --git a/sysdeps/unix/sysv/linux/powerpc/htm.h b/sysdeps/unix/sysv/linux/powerpc/htm.h new file mode 100644 index 0000000000..57d5cd6262 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/htm.h @@ -0,0 +1,138 @@ +/* Shared HTM header. Emulate transactional execution facility intrinsics for + compilers and assemblers that do not support the intrinsics and instructions + yet. + + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _HTM_H +#define _HTM_H 1 + +#ifdef __ASSEMBLER__ + +/* tbegin. */ +.macro TBEGIN + .long 0x7c00051d +.endm + +/* tend. 0 */ +.macro TEND + .long 0x7c00055d +.endm + +/* tabort. code */ +.macro TABORT code + .byte 0x7c + .byte \code + .byte 0x07 + .byte 0x1d +.endm + +/*"TEXASR - Transaction EXception And Summary Register" + mfspr %dst,130 */ +.macro TEXASR dst + mfspr \dst,130 +.endm + +#else + +#include <endian.h> + +/* Official HTM intrinsics interface matching GCC, but works + on older GCC compatible compilers and binutils. + We should somehow detect if the compiler supports it, because + it may be able to generate slightly better code. */ + +#define TBEGIN ".long 0x7c00051d" +#define TEND ".long 0x7c00055d" +#if __BYTE_ORDER == __LITTLE_ENDIAN +# define TABORT ".byte 0x1d,0x07,%1,0x7c" +#else +# define TABORT ".byte 0x7c,%1,0x07,0x1d" +#endif + +#define __force_inline inline __attribute__((__always_inline__)) + +#ifndef __HTM__ + +#define _TEXASRU_EXTRACT_BITS(TEXASR,BITNUM,SIZE) \ + (((TEXASR) >> (31-(BITNUM))) & ((1<<(SIZE))-1)) +#define _TEXASRU_FAILURE_PERSISTENT(TEXASRU) \ + _TEXASRU_EXTRACT_BITS(TEXASRU, 7, 1) + +#define _tbegin() \ + ({ unsigned int __ret; \ + asm volatile ( \ + TBEGIN "\t\n" \ + "mfcr %0\t\n" \ + "rlwinm %0,%0,3,1\t\n" \ + "xori %0,%0,1\t\n" \ + : "=r" (__ret) : \ + : "cr0", "memory"); \ + __ret; \ + }) + +#define _tend() \ + ({ unsigned int __ret; \ + asm volatile ( \ + TEND "\t\n" \ + "mfcr %0\t\n" \ + "rlwinm %0,%0,3,1\t\n" \ + "xori %0,%0,1\t\n" \ + : "=r" (__ret) : \ + : "cr0", "memory"); \ + __ret; \ + }) + +#define _tabort(__code) \ + ({ unsigned int __ret; \ + asm volatile ( \ + TABORT "\t\n" \ + "mfcr %0\t\n" \ + "rlwinm %0,%0,3,1\t\n" \ + "xori %0,%0,1\t\n" \ + : "=r" (__ret) : "r" (__code) \ + : "cr0", "memory"); \ + __ret; \ + }) + +#define _texasru() \ + ({ unsigned long __ret; \ + asm volatile ( \ + "mfspr %0,131\t\n" \ + : "=r" (__ret)); \ + __ret; \ + }) + +#define __builtin_tbegin(tdb) _tbegin () +#define __builtin_tend(nested) _tend () +#define __builtin_tabort(abortcode) _tabort (abortcode) +#define __builtin_get_texasru() _texasru () + +#else +# include <htmintrin.h> +#endif /* __HTM__ */ + +#endif /* __ASSEMBLER__ */ + +/* Definitions used for TEXASR Failure code (bits 0:6), they need to be even + because tabort. always sets the first bit. */ +#define _ABORT_LOCK_BUSY 0x3f /* Lock already used. */ +#define _ABORT_NESTED_TRYLOCK 0x3e /* Write operation in trylock. */ +#define _ABORT_SYSCALL 0x3d /* Syscall issued. */ + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/init-first.c b/sysdeps/unix/sysv/linux/powerpc/init-first.c index 4cc3e8cc2e..287e84459a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/init-first.c +++ b/sysdeps/unix/sysv/linux/powerpc/init-first.c @@ -1,5 +1,5 @@ /* Initialization code run first thing by the ELF startup code. Linux/PowerPC. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 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 @@ -18,22 +18,21 @@ #ifdef SHARED # include <dl-vdso.h> -# undef __gettimeofday -# undef __clock_gettime -# undef __clock_getres -# include <bits/libc-vdso.h> - -void *__vdso_gettimeofday attribute_hidden; -void *__vdso_clock_gettime; -void *__vdso_clock_getres; -void *__vdso_get_tbfreq; -void *__vdso_getcpu; -void *__vdso_time; +# include <libc-vdso.h> + +int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) + attribute_hidden; +int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *); +int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *); +unsigned long long (*VDSO_SYMBOL(get_tbfreq)) (void); +int (*VDSO_SYMBOL(getcpu)) (unsigned *, unsigned *); +time_t (*VDSO_SYMBOL(time)) (time_t *); + #if defined(__PPC64__) || defined(__powerpc64__) -void *__vdso_sigtramp_rt64; +void *VDSO_SYMBOL(sigtramp_rt64); #else -void *__vdso_sigtramp32; -void *__vdso_sigtramp_rt32; +void *VDSO_SYMBOL(sigtramp32); +void *VDSO_SYMBOL(sigtramp_rt32); #endif static inline void @@ -41,26 +40,42 @@ _libc_vdso_platform_setup (void) { PREPARE_VERSION (linux2615, "LINUX_2.6.15", 123718565); - __vdso_gettimeofday = _dl_vdso_vsym ("__kernel_gettimeofday", &linux2615); + void *p = _dl_vdso_vsym ("__kernel_gettimeofday", &linux2615); + PTR_MANGLE (p); + VDSO_SYMBOL (gettimeofday) = p; - __vdso_clock_gettime = _dl_vdso_vsym ("__kernel_clock_gettime", &linux2615); + p = _dl_vdso_vsym ("__kernel_clock_gettime", &linux2615); + PTR_MANGLE (p); + VDSO_SYMBOL (clock_gettime) = p; - __vdso_clock_getres = _dl_vdso_vsym ("__kernel_clock_getres", &linux2615); + p = _dl_vdso_vsym ("__kernel_clock_getres", &linux2615); + PTR_MANGLE (p); + VDSO_SYMBOL (clock_getres) = p; - __vdso_get_tbfreq = _dl_vdso_vsym ("__kernel_get_tbfreq", &linux2615); + p = _dl_vdso_vsym ("__kernel_get_tbfreq", &linux2615); + PTR_MANGLE (p); + VDSO_SYMBOL (get_tbfreq) = p; - __vdso_getcpu = _dl_vdso_vsym ("__kernel_getcpu", &linux2615); + p = _dl_vdso_vsym ("__kernel_getcpu", &linux2615); + PTR_MANGLE (p); + VDSO_SYMBOL (getcpu) = p; - __vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615); + p = _dl_vdso_vsym ("__kernel_time", &linux2615); + PTR_MANGLE (p); + VDSO_SYMBOL (time) = p; /* PPC64 uses only one signal trampoline symbol, while PPC32 will use two depending if SA_SIGINFO is used (__kernel_sigtramp_rt32) or not - (__kernel_sigtramp32). */ + (__kernel_sigtramp32). + There is no need to pointer mangle these symbol because they will + used only for pointer comparison. */ #if defined(__PPC64__) || defined(__powerpc64__) - __vdso_sigtramp_rt64 = _dl_vdso_vsym ("__kernel_sigtramp_rt64", &linux2615); + VDSO_SYMBOL(sigtramp_rt64) = _dl_vdso_vsym ("__kernel_sigtramp_rt64", + &linux2615); #else - __vdso_sigtramp32 = _dl_vdso_vsym ("__kernel_sigtramp32", &linux2615); - __vdso_sigtramp_rt32 = _dl_vdso_vsym ("__kernel_sigtramp_rt32", &linux2615); + VDSO_SYMBOL(sigtramp32) = _dl_vdso_vsym ("__kernel_sigtramp32", &linux2615); + VDSO_SYMBOL(sigtramp_rt32) = _dl_vdso_vsym ("__kernel_sigtramp_rt32", + &linux2615); #endif } diff --git a/sysdeps/unix/sysv/linux/powerpc/ioctl.c b/sysdeps/unix/sysv/linux/powerpc/ioctl.c index 165bbc7ed7..75d81e3a95 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ioctl.c +++ b/sysdeps/unix/sysv/linux/powerpc/ioctl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 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/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h b/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h index a569310196..a3725e14b1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h +++ b/sysdeps/unix/sysv/linux/powerpc/ipc_priv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-2014 Free Software Foundation, Inc. +/* Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h new file mode 100644 index 0000000000..6d93491873 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h @@ -0,0 +1,42 @@ +/* Set flags signalling availability of kernel features based on given + kernel version number. PowerPC version. + Copyright (C) 1999-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +/* PowerPC uses socketcall. */ +#define __ASSUME_SOCKETCALL 1 + +/* The accept4 syscall was added for PowerPC in 2.6.37. */ +#if __LINUX_KERNEL_VERSION >= 0x020625 +# define __ASSUME_ACCEPT4_SYSCALL 1 +#endif + +/* The recvmmsg syscall was added for PowerPC in 2.6.37. */ +#if __LINUX_KERNEL_VERSION >= 0x020625 +# define __ASSUME_RECVMMSG_SYSCALL 1 +#endif + +/* The sendmmsg syscall was added for PowerPC in 3.0. */ +#if __LINUX_KERNEL_VERSION >= 0x030000 +# define __ASSUME_SENDMMSG_SYSCALL 1 +#endif +#define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL 1 + +#include_next <kernel-features.h> + +/* PowerPC64 IPC is always 64-bit and does not use __IPC_64. */ +#undef __ASSUME_IPC64 diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel_termios.h b/sysdeps/unix/sysv/linux/powerpc/kernel_termios.h index ea029991cc..c970fff614 100644 --- a/sysdeps/unix/sysv/linux/powerpc/kernel_termios.h +++ b/sysdeps/unix/sysv/linux/powerpc/kernel_termios.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 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/sysdeps/unix/sysv/linux/powerpc/ldconfig.h b/sysdeps/unix/sysv/linux/powerpc/ldconfig.h index 2c0eca20a2..8a1f698a81 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ldconfig.h +++ b/sysdeps/unix/sysv/linux/powerpc/ldconfig.h @@ -1,5 +1,5 @@ /* ldconfig default paths and libraries. Linux/PowerPC version. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/ldsodefs.h b/sysdeps/unix/sysv/linux/powerpc/ldsodefs.h index f2d0e6ae30..0c7f3eefce 100644 --- a/sysdeps/unix/sysv/linux/powerpc/ldsodefs.h +++ b/sysdeps/unix/sysv/linux/powerpc/ldsodefs.h @@ -1,6 +1,6 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. PowerPC version. - Copyright (C) 2013-2014 Free Software Foundation, Inc. + Copyright (C) 2013-2015 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/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c index acd9f82240..a9364c786a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c +++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 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/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h index e90829db27..5868d248eb 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h @@ -1,5 +1,5 @@ /* Resolve function pointers to VDSO functions. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 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,23 +22,21 @@ #ifdef SHARED -extern void *__vdso_gettimeofday attribute_hidden; +#include <sysdep-vdso.h> -extern void *__vdso_clock_gettime; - -extern void *__vdso_clock_getres; - -extern void *__vdso_get_tbfreq; - -extern void *__vdso_getcpu; - -extern void *__vdso_time; +extern int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) + attribute_hidden; +extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *); +extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *); +extern unsigned long long (*VDSO_SYMBOL(get_tbfreq)) (void); +extern int (*VDSO_SYMBOL(getcpu)) (unsigned *, unsigned *); +extern time_t (*VDSO_SYMBOL(time)) (time_t *); #if defined(__PPC64__) || defined(__powerpc64__) -extern void *__vdso_sigtramp_rt64; +extern void *VDSO_SYMBOL(sigtramp_rt64); #else -extern void *__vdso_sigtramp32; -extern void *__vdso_sigtramp_rt32; +extern void *VDSO_SYMBOL(sigtramp32); +extern void *VDSO_SYMBOL(sigtramp_rt32); #endif #if (defined(__PPC64__) || defined(__powerpc64__)) && _CALL_ELF != 2 diff --git a/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h b/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h new file mode 100644 index 0000000000..67db1dece2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h @@ -0,0 +1,48 @@ +/* PowerPC specific lock definitions. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _POWERPC_LOWLEVELLOCK_H +#define _POWERPC_LOWLEVELLOCK_H 1 + +#include <sysdeps/nptl/lowlevellock.h> + +/* Transactional lock elision definitions. */ +extern int __lll_timedlock_elision + (int *futex, short *adapt_count, const struct timespec *timeout, int private) + attribute_hidden; + +#define lll_timedlock_elision(futex, adapt_count, timeout, private) \ + __lll_timedlock_elision(&(futex), &(adapt_count), timeout, private) + +extern int __lll_lock_elision (int *futex, short *adapt_count, int private) + attribute_hidden; + +extern int __lll_unlock_elision(int *lock, int private) + attribute_hidden; + +extern int __lll_trylock_elision(int *lock, short *adapt_count) + attribute_hidden; + +#define lll_lock_elision(futex, adapt_count, private) \ + __lll_lock_elision (&(futex), &(adapt_count), private) +#define lll_unlock_elision(futex, private) \ + __lll_unlock_elision (&(futex), private) +#define lll_trylock_elision(futex, adapt_count) \ + __lll_trylock_elision (&(futex), &(adapt_count)) + +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions index 8d1c3a59de..e13d20b93b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions @@ -34,3 +34,13 @@ libc { __ppc_get_timebase_freq; } } + +libpthread { + GLIBC_2.3.4 { + longjmp; siglongjmp; + } + GLIBC_2.6 { + # Changed PTHREAD_STACK_MIN. + pthread_attr_setstack; pthread_attr_setstacksize; + } +} diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S index 09673f75ff..2ab4851de9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S index 74ac9f6b45..2fe2046b64 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S @@ -1,5 +1,5 @@ /* brk system call for Linux/ppc. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/c++-types.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/c++-types.data index fde53bf337..fde53bf337 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/c++-types.data +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/c++-types.data diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S index bb1510dff1..c5d6634515 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S @@ -1,5 +1,5 @@ /* Wrapper around clone system call. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2015 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 @@ -19,7 +19,6 @@ #include <sysdep.h> #define _ERRNO_H 1 #include <bits/errno.h> -#include <kernel-features.h> #define CLONE_VM 0x00000100 #define CLONE_THREAD 0x00010000 @@ -44,11 +43,7 @@ ENTRY (__clone) /* Set up stack frame for parent. */ stwu r1,-32(r1) cfi_adjust_cfa_offset (32) -#ifdef RESET_PID stmw r28,16(r1) -#else - stmw r30,16(r1) -#endif /* Set up stack frame for child. */ clrrwi r4,r4,4 @@ -57,9 +52,7 @@ ENTRY (__clone) /* Save fn, args, stack across syscall. */ mr r30,r3 /* Function in r30. */ -#ifdef RESET_PID mr r28,r5 -#endif mr r31,r6 /* Argument in r31. */ /* 'flags' argument is first parameter to clone syscall. (The other @@ -83,7 +76,6 @@ ENTRY (__clone) crandc cr1*4+eq,cr1*4+eq,cr0*4+so bne- cr1,L(parent) /* The '-' is to minimise the race. */ -#ifdef RESET_PID andis. r0,r28,CLONE_THREAD>>16 bne+ r0,L(oldpid) andi. r0,r28,CLONE_VM @@ -94,7 +86,6 @@ L(nomoregetpid): stw r3,TID(r2) stw r3,PID(r2) L(oldpid): -#endif /* Call procedure. */ mtctr r30 @@ -105,11 +96,7 @@ L(oldpid): L(parent): /* Parent. Restore registers & return. */ -#ifdef RESET_PID lmw r28,16(r1) -#else - lmw r30,16(r1) -#endif addi r1,r1,32 bnslr+ b __syscall_error@local diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc32/configure new file mode 100644 index 0000000000..eb58187ff4 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/configure @@ -0,0 +1,4 @@ +# This file is generated from configure.ac by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc32. + +libc_cv_gcc_unwind_find_fde=yes diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc32/configure.ac new file mode 100644 index 0000000000..e1c4c0d357 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/configure.ac @@ -0,0 +1,4 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc32. + +libc_cv_gcc_unwind_find_fde=yes diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c index 7f65eaf407..4178e52183 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_mask.c @@ -1,5 +1,5 @@ /* Procedure definition for FE_MASK_ENV for Linux/ppc. - Copyright (C) 2007-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 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,7 +22,6 @@ #include <unistd.h> #include <sysdep.h> #include <sys/prctl.h> -#include <kernel-features.h> const fenv_t * __fe_mask_env (void) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c index 6f20b0597c..15a8976aac 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/fe_nomask.c @@ -1,5 +1,5 @@ /* Procedure definition for FE_NOMASK_ENV for Linux/ppc. - Copyright (C) 2000-2014 Free Software Foundation, Inc. + Copyright (C) 2000-2015 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,7 +22,6 @@ #include <unistd.h> #include <sysdep.h> #include <sys/prctl.h> -#include <kernel-features.h> #include <shlib-compat.h> const fenv_t * diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index f27b48b3c6..0f1546399b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -1983,6 +1983,9 @@ GLIBC_2.2.4 GLIBC_2.2.6 GLIBC_2.2.6 A __nanosleep F +GLIBC_2.22 + GLIBC_2.22 A + fmemopen F GLIBC_2.3 GLIBC_2.3 A __ctype_b_loc F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist index 76a4ba31db..76a4ba31db 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data new file mode 100644 index 0000000000..b25abf8006 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/localplt.data @@ -0,0 +1,15 @@ +libc.so: _Unwind_Find_FDE +libc.so: calloc +libc.so: free +libc.so: malloc +libc.so: memalign +libc.so: realloc +libm.so: matherr +# The dynamic loader uses __libc_memalign internally to allocate aligned +# TLS storage. The other malloc family of functions are expected to allow +# user symbol interposition. +ld.so: __libc_memalign +ld.so: malloc +ld.so: calloc +ld.so: realloc +ld.so: free diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/ld.abilist deleted file mode 100644 index d71611f027..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/ld.abilist +++ /dev/null @@ -1,17 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - __libc_memalign F - _r_debug D 0x14 - calloc F - free F - malloc F - realloc F -GLIBC_2.1 - GLIBC_2.1 A - __libc_stack_end D 0x4 - _dl_mcount F -GLIBC_2.3 - GLIBC_2.3 A - __tls_get_addr F -GLIBC_2.4 - GLIBC_2.4 A diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data deleted file mode 100644 index 8fb56b6086..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data +++ /dev/null @@ -1,7 +0,0 @@ -libc.so: _Unwind_Find_FDE -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c index cb2324d994..9ba5b768e2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ftruncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S index f50d492d99..27e37b09ea 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S @@ -1,5 +1,5 @@ /* Save current context, powerpc32 common. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S index cab1fda878..574f0d0536 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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 @@ -19,7 +19,6 @@ #include <sysdep.h> #include <rtld-global-offsets.h> #include <shlib-compat.h> -#include <kernel-features.h> #define __ASSEMBLY__ #include <asm/ptrace.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h index 04edf836b9..a9ae64b467 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/kernel_stat.h @@ -1,5 +1,5 @@ /* Definition of `struct stat' used in the kernel. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist index d71611f027..7d24961a92 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/ld.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ld.abilist @@ -10,6 +10,9 @@ GLIBC_2.1 GLIBC_2.1 A __libc_stack_end D 0x4 _dl_mcount F +GLIBC_2.22 + GLIBC_2.22 A + __tls_get_addr_opt F GLIBC_2.3 GLIBC_2.3 A __tls_get_addr F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libBrokenLocale.abilist index f4ca37f44b..f4ca37f44b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libBrokenLocale.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libanl.abilist index c9755d8a33..c9755d8a33 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libanl.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libcrypt.abilist index 1df145f260..1df145f260 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libcrypt.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libdl.abilist index 62e6b41edb..62e6b41edb 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libdl.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libnsl.abilist index 4241e2d887..4241e2d887 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libnsl.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist index c8a2a04711..c8a2a04711 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libresolv.abilist index f68333d4a4..f68333d4a4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libresolv.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist index af7df27cb3..af7df27cb3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/librt.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libthread_db.abilist index f33138067c..f33138067c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libthread_db.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist index 7422687e3c..7422687e3c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libutil.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S index afad726e28..1d6915b5ec 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S @@ -1,5 +1,5 @@ /* Set up a context to call a function. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/context-e500.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/context-e500.h index 4cc9a81dc1..c5e92db69b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/context-e500.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/context-e500.h @@ -1,5 +1,5 @@ /* getcontext/setcontext/makecontext support for e500 high parts of registers. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S index 0039b90e7e..9cd3c5b0d2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index a54382e43d..7bcaa07698 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -1989,6 +1989,9 @@ GLIBC_2.2.4 GLIBC_2.2.6 GLIBC_2.2.6 A __nanosleep F +GLIBC_2.22 + GLIBC_2.22 A + fmemopen F GLIBC_2.3 GLIBC_2.3 A __ctype_b_loc F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist index 9bd593c0e9..9bd593c0e9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data index 6332a006d8..0b3b32739f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data @@ -38,3 +38,11 @@ libm.so: __signbitl libm.so: copysignl ? libm.so: fabsl libm.so: matherr +# The dynamic loader uses __libc_memalign internally to allocate aligned +# TLS storage. The other malloc family of functions are expected to allow +# user symbol interposition. +ld.so: __libc_memalign +ld.so: malloc +ld.so: calloc +ld.so: realloc +ld.so: free diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/c++-types.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/c++-types.data deleted file mode 100644 index fde53bf337..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/c++-types.data +++ /dev/null @@ -1,67 +0,0 @@ -blkcnt64_t:x -blkcnt_t:l -blksize_t:l -caddr_t:Pc -clockid_t:i -clock_t:l -daddr_t:i -dev_t:y -fd_mask:l -fsblkcnt64_t:y -fsblkcnt_t:m -fsfilcnt64_t:y -fsfilcnt_t:m -fsid_t:8__fsid_t -gid_t:j -id_t:j -ino64_t:y -ino_t:m -int16_t:s -int32_t:i -int64_t:x -int8_t:a -intptr_t:i -key_t:i -loff_t:x -mode_t:j -nlink_t:j -off64_t:x -off_t:l -pid_t:i -pthread_attr_t:14pthread_attr_t -pthread_barrier_t:17pthread_barrier_t -pthread_barrierattr_t:21pthread_barrierattr_t -pthread_cond_t:14pthread_cond_t -pthread_condattr_t:18pthread_condattr_t -pthread_key_t:j -pthread_mutex_t:15pthread_mutex_t -pthread_mutexattr_t:19pthread_mutexattr_t -pthread_once_t:i -pthread_rwlock_t:16pthread_rwlock_t -pthread_rwlockattr_t:20pthread_rwlockattr_t -pthread_spinlock_t:i -pthread_t:m -quad_t:x -register_t:i -rlim64_t:y -rlim_t:m -sigset_t:10__sigset_t -size_t:j -socklen_t:j -ssize_t:i -suseconds_t:l -time_t:l -u_char:h -uid_t:j -uint:j -u_int:j -u_int16_t:t -u_int32_t:j -u_int64_t:y -u_int8_t:h -ulong:m -u_long:m -u_quad_t:y -useconds_t:j -ushort:t -u_short:t diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist deleted file mode 100644 index f4ca37f44b..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libBrokenLocale.abilist +++ /dev/null @@ -1,3 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - __ctype_get_mb_cur_max F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist deleted file mode 100644 index c9755d8a33..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libanl.abilist +++ /dev/null @@ -1,6 +0,0 @@ -GLIBC_2.2.3 - GLIBC_2.2.3 A - gai_cancel F - gai_error F - gai_suspend F - getaddrinfo_a F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist deleted file mode 100644 index 1df145f260..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libcrypt.abilist +++ /dev/null @@ -1,9 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - crypt F - crypt_r F - encrypt F - encrypt_r F - fcrypt F - setkey F - setkey_r F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist deleted file mode 100644 index 62e6b41edb..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libdl.abilist +++ /dev/null @@ -1,18 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - dladdr F - dlclose F - dlerror F - dlopen F - dlsym F -GLIBC_2.1 - GLIBC_2.1 A - dlopen F - dlvsym F -GLIBC_2.3.3 - GLIBC_2.3.3 A - dladdr1 F - dlinfo F -GLIBC_2.3.4 - GLIBC_2.3.4 A - dlmopen F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist deleted file mode 100644 index 4241e2d887..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libnsl.abilist +++ /dev/null @@ -1,127 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - __yp_check F - xdr_domainname F - xdr_keydat F - xdr_mapname F - xdr_peername F - xdr_valdat F - xdr_yp_buf F - xdr_ypbind_binding F - xdr_ypbind_resp F - xdr_ypbind_resptype F - xdr_ypbind_setdom F - xdr_ypdelete_args F - xdr_ypmap_parms F - xdr_ypmaplist F - xdr_yppush_status F - xdr_yppushresp_xfr F - xdr_ypreq_key F - xdr_ypreq_nokey F - xdr_ypreq_xfr F - xdr_ypresp_all F - xdr_ypresp_key_val F - xdr_ypresp_maplist F - xdr_ypresp_master F - xdr_ypresp_order F - xdr_ypresp_val F - xdr_ypresp_xfr F - xdr_ypstat F - xdr_ypupdate_args F - xdr_ypxfrstat F - yp_all F - yp_bind F - yp_first F - yp_get_default_domain F - yp_maplist F - yp_master F - yp_match F - yp_next F - yp_order F - yp_unbind F - yp_update F - ypbinderr_string F - yperr_string F - ypprot_err F -GLIBC_2.1 - GLIBC_2.1 A - __free_fdresult F - __nis_default_access F - __nis_default_group F - __nis_default_owner F - __nis_default_ttl F - __nis_finddirectory F - __nis_hash F - __nisbind_connect F - __nisbind_create F - __nisbind_destroy F - __nisbind_next F - nis_add F - nis_add_entry F - nis_addmember F - nis_checkpoint F - nis_clone_directory F - nis_clone_object F - nis_clone_result F - nis_creategroup F - nis_destroy_object F - nis_destroygroup F - nis_dir_cmp F - nis_domain_of F - nis_domain_of_r F - nis_first_entry F - nis_free_directory F - nis_free_object F - nis_free_request F - nis_freenames F - nis_freeresult F - nis_freeservlist F - nis_freetags F - nis_getnames F - nis_getservlist F - nis_ismember F - nis_leaf_of F - nis_leaf_of_r F - nis_lerror F - nis_list F - nis_local_directory F - nis_local_group F - nis_local_host F - nis_local_principal F - nis_lookup F - nis_mkdir F - nis_modify F - nis_modify_entry F - nis_name_of F - nis_name_of_r F - nis_next_entry F - nis_perror F - nis_ping F - nis_print_directory F - nis_print_entry F - nis_print_group F - nis_print_group_entry F - nis_print_link F - nis_print_object F - nis_print_result F - nis_print_rights F - nis_print_table F - nis_read_obj F - nis_remove F - nis_remove_entry F - nis_removemember F - nis_rmdir F - nis_servstate F - nis_sperrno F - nis_sperror F - nis_sperror_r F - nis_stats F - nis_verifygroup F - nis_write_obj F - readColdStartFile F - writeColdStartFile F - xdr_cback_data F - xdr_obj_p F -GLIBC_2.2 - GLIBC_2.2 A - xdr_ypall F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist deleted file mode 100644 index c8a2a04711..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libpthread.abilist +++ /dev/null @@ -1,277 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - _IO_flockfile F - _IO_ftrylockfile F - _IO_funlockfile F - __close F - __connect F - __errno_location F - __fcntl F - __fork F - __h_errno_location F - __lseek F - __open F - __pthread_getspecific F - __pthread_key_create F - __pthread_mutex_destroy F - __pthread_mutex_init F - __pthread_mutex_lock F - __pthread_mutex_trylock F - __pthread_mutex_unlock F - __pthread_mutexattr_destroy F - __pthread_mutexattr_init F - __pthread_mutexattr_settype F - __pthread_once F - __pthread_setspecific F - __read F - __send F - __sigaction F - __wait F - __write F - _pthread_cleanup_pop F - _pthread_cleanup_pop_restore F - _pthread_cleanup_push F - _pthread_cleanup_push_defer F - accept F - close F - connect F - fcntl F - flockfile F - fork F - fsync F - ftrylockfile F - funlockfile F - longjmp F - lseek F - msync F - nanosleep F - open F - pause F - pthread_atfork F - pthread_attr_destroy F - pthread_attr_getdetachstate F - pthread_attr_getinheritsched F - pthread_attr_getschedparam F - pthread_attr_getschedpolicy F - pthread_attr_getscope F - pthread_attr_init F - pthread_attr_setdetachstate F - pthread_attr_setinheritsched F - pthread_attr_setschedparam F - pthread_attr_setschedpolicy F - pthread_attr_setscope F - pthread_cancel F - pthread_cond_broadcast F - pthread_cond_destroy F - pthread_cond_init F - pthread_cond_signal F - pthread_cond_timedwait F - pthread_cond_wait F - pthread_condattr_destroy F - pthread_condattr_init F - pthread_create F - pthread_detach F - pthread_equal F - pthread_exit F - pthread_getschedparam F - pthread_getspecific F - pthread_join F - pthread_key_create F - pthread_key_delete F - pthread_kill F - pthread_kill_other_threads_np F - pthread_mutex_destroy F - pthread_mutex_init F - pthread_mutex_lock F - pthread_mutex_trylock F - pthread_mutex_unlock F - pthread_mutexattr_destroy F - pthread_mutexattr_getkind_np F - pthread_mutexattr_init F - pthread_mutexattr_setkind_np F - pthread_once F - pthread_self F - pthread_setcancelstate F - pthread_setcanceltype F - pthread_setschedparam F - pthread_setspecific F - pthread_sigmask F - pthread_testcancel F - raise F - read F - recv F - recvfrom F - recvmsg F - sem_destroy F - sem_getvalue F - sem_init F - sem_post F - sem_trywait F - sem_wait F - send F - sendmsg F - sendto F - sigaction F - siglongjmp F - sigwait F - system F - tcdrain F - vfork F - wait F - waitpid F - write F -GLIBC_2.1 - GLIBC_2.1 A - __libc_allocate_rtsig F - __libc_current_sigrtmax F - __libc_current_sigrtmin F - pthread_attr_getguardsize F - pthread_attr_getstackaddr F - pthread_attr_getstacksize F - pthread_attr_init F - pthread_attr_setguardsize F - pthread_attr_setstackaddr F - pthread_attr_setstacksize F - pthread_create F - pthread_getconcurrency F - pthread_mutexattr_gettype F - pthread_mutexattr_settype F - pthread_rwlock_destroy F - pthread_rwlock_init F - pthread_rwlock_rdlock F - pthread_rwlock_tryrdlock F - pthread_rwlock_trywrlock F - pthread_rwlock_unlock F - pthread_rwlock_wrlock F - pthread_rwlockattr_destroy F - pthread_rwlockattr_getkind_np F - pthread_rwlockattr_getpshared F - pthread_rwlockattr_init F - pthread_rwlockattr_setkind_np F - pthread_rwlockattr_setpshared F - pthread_setconcurrency F - sem_destroy F - sem_getvalue F - sem_init F - sem_post F - sem_trywait F - sem_wait F -GLIBC_2.1.1 - GLIBC_2.1.1 A - sem_close F - sem_open F - sem_unlink F -GLIBC_2.1.2 - GLIBC_2.1.2 A - __vfork F -GLIBC_2.11 - GLIBC_2.11 A - pthread_sigqueue F -GLIBC_2.12 - GLIBC_2.12 A - pthread_getname_np F - pthread_mutex_consistent F - pthread_mutexattr_getrobust F - pthread_mutexattr_setrobust F - pthread_setname_np F -GLIBC_2.18 - GLIBC_2.18 A - pthread_getattr_default_np F - pthread_setattr_default_np F -GLIBC_2.2 - GLIBC_2.2 A - __open64 F - __pread64 F - __pthread_rwlock_destroy F - __pthread_rwlock_init F - __pthread_rwlock_rdlock F - __pthread_rwlock_tryrdlock F - __pthread_rwlock_trywrlock F - __pthread_rwlock_unlock F - __pthread_rwlock_wrlock F - __pwrite64 F - __res_state F - lseek64 F - open64 F - pread F - pread64 F - pthread_attr_getstack F - pthread_attr_setstack F - pthread_barrier_destroy F - pthread_barrier_init F - pthread_barrier_wait F - pthread_barrierattr_destroy F - pthread_barrierattr_init F - pthread_barrierattr_setpshared F - pthread_condattr_getpshared F - pthread_condattr_setpshared F - pthread_getcpuclockid F - pthread_mutex_timedlock F - pthread_mutexattr_getpshared F - pthread_mutexattr_setpshared F - pthread_rwlock_timedrdlock F - pthread_rwlock_timedwrlock F - pthread_spin_destroy F - pthread_spin_init F - pthread_spin_lock F - pthread_spin_trylock F - pthread_spin_unlock F - pthread_yield F - pwrite F - pwrite64 F - sem_timedwait F -GLIBC_2.2.3 - GLIBC_2.2.3 A - pthread_getattr_np F -GLIBC_2.2.6 - GLIBC_2.2.6 A - __nanosleep F -GLIBC_2.3.2 - GLIBC_2.3.2 A - pthread_cond_broadcast F - pthread_cond_destroy F - pthread_cond_init F - pthread_cond_signal F - pthread_cond_timedwait F - pthread_cond_wait F -GLIBC_2.3.3 - GLIBC_2.3.3 A - __pthread_cleanup_routine F - __pthread_register_cancel F - __pthread_register_cancel_defer F - __pthread_unregister_cancel F - __pthread_unregister_cancel_restore F - __pthread_unwind_next F - pthread_attr_getaffinity_np F - pthread_attr_setaffinity_np F - pthread_barrierattr_getpshared F - pthread_condattr_getclock F - pthread_condattr_setclock F - pthread_getaffinity_np F - pthread_setaffinity_np F - pthread_timedjoin_np F - pthread_tryjoin_np F -GLIBC_2.3.4 - GLIBC_2.3.4 A - longjmp F - pthread_attr_getaffinity_np F - pthread_attr_setaffinity_np F - pthread_getaffinity_np F - pthread_setaffinity_np F - pthread_setschedprio F - siglongjmp F -GLIBC_2.4 - GLIBC_2.4 A - pthread_mutex_consistent_np F - pthread_mutex_getprioceiling F - pthread_mutex_setprioceiling F - pthread_mutexattr_getprioceiling F - pthread_mutexattr_getprotocol F - pthread_mutexattr_getrobust_np F - pthread_mutexattr_setprioceiling F - pthread_mutexattr_setprotocol F - pthread_mutexattr_setrobust_np F -GLIBC_2.6 - GLIBC_2.6 A - pthread_attr_setstack F - pthread_attr_setstacksize F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist deleted file mode 100644 index f68333d4a4..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libresolv.abilist +++ /dev/null @@ -1,104 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - __b64_ntop F - __b64_pton F - __dn_comp F - __dn_count_labels F - __dn_skipname F - __fp_nquery F - __fp_query F - __fp_resstat F - __hostalias F - __loc_aton F - __loc_ntoa F - __p_cdname F - __p_cdnname F - __p_class F - __p_class_syms D 0x54 - __p_fqname F - __p_fqnname F - __p_option F - __p_query F - __p_secstodate F - __p_time F - __p_type F - __p_type_syms D 0x228 - __putlong F - __putshort F - __res_close F - __res_dnok F - __res_hnok F - __res_isourserver F - __res_mailok F - __res_nameinquery F - __res_ownok F - __res_queriesmatch F - __res_send F - __sym_ntop F - __sym_ntos F - __sym_ston F - _gethtbyaddr F - _gethtbyname F - _gethtbyname2 F - _gethtent F - _getlong F - _getshort F - _res_opcodes D 0x40 - _sethtent F - dn_expand F - inet_net_ntop F - inet_net_pton F - inet_neta F - res_gethostbyaddr F - res_gethostbyname F - res_gethostbyname2 F - res_mkquery F - res_query F - res_querydomain F - res_search F - res_send_setqhook F - res_send_setrhook F -GLIBC_2.2 - GLIBC_2.2 A - __dn_expand F - __res_hostalias F - __res_mkquery F - __res_nmkquery F - __res_nquery F - __res_nquerydomain F - __res_nsearch F - __res_nsend F - __res_query F - __res_querydomain F - __res_search F -GLIBC_2.3.2 - GLIBC_2.3.2 A - __p_rcode F -GLIBC_2.9 - GLIBC_2.9 A - ns_datetosecs F - ns_format_ttl F - ns_get16 F - ns_get32 F - ns_initparse F - ns_makecanon F - ns_msg_getflag F - ns_name_compress F - ns_name_ntol F - ns_name_ntop F - ns_name_pack F - ns_name_pton F - ns_name_rollback F - ns_name_skip F - ns_name_uncompress F - ns_name_unpack F - ns_parse_ttl F - ns_parserr F - ns_put16 F - ns_put32 F - ns_samedomain F - ns_samename F - ns_skiprr F - ns_sprintrr F - ns_sprintrrf F - ns_subdomain F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist deleted file mode 100644 index af7df27cb3..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/librt.abilist +++ /dev/null @@ -1,52 +0,0 @@ -GLIBC_2.1 - GLIBC_2.1 A - aio_cancel F - aio_cancel64 F - aio_error F - aio_error64 F - aio_fsync F - aio_fsync64 F - aio_init F - aio_read F - aio_read64 F - aio_return F - aio_return64 F - aio_suspend F - aio_suspend64 F - aio_write F - aio_write64 F - lio_listio F - lio_listio64 F -GLIBC_2.2 - GLIBC_2.2 A - clock_getcpuclockid F - clock_getres F - clock_gettime F - clock_nanosleep F - clock_settime F - shm_open F - shm_unlink F - timer_create F - timer_delete F - timer_getoverrun F - timer_gettime F - timer_settime F -GLIBC_2.3.4 - GLIBC_2.3.4 A - mq_close F - mq_getattr F - mq_notify F - mq_open F - mq_receive F - mq_send F - mq_setattr F - mq_timedreceive F - mq_timedsend F - mq_unlink F -GLIBC_2.4 - GLIBC_2.4 A - lio_listio F - lio_listio64 F -GLIBC_2.7 - GLIBC_2.7 A - __mq_open_2 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist deleted file mode 100644 index f33138067c..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libthread_db.abilist +++ /dev/null @@ -1,48 +0,0 @@ -GLIBC_2.1.3 - GLIBC_2.1.3 A - td_init F - td_log F - td_ta_clear_event F - td_ta_delete F - td_ta_enable_stats F - td_ta_event_addr F - td_ta_event_getmsg F - td_ta_get_nthreads F - td_ta_get_ph F - td_ta_get_stats F - td_ta_map_id2thr F - td_ta_map_lwp2thr F - td_ta_new F - td_ta_reset_stats F - td_ta_set_event F - td_ta_setconcurrency F - td_ta_thr_iter F - td_ta_tsd_iter F - td_thr_clear_event F - td_thr_dbresume F - td_thr_dbsuspend F - td_thr_event_enable F - td_thr_event_getmsg F - td_thr_get_info F - td_thr_getfpregs F - td_thr_getgregs F - td_thr_getxregs F - td_thr_getxregsize F - td_thr_set_event F - td_thr_setfpregs F - td_thr_setgregs F - td_thr_setprio F - td_thr_setsigpending F - td_thr_setxregs F - td_thr_sigsetmask F - td_thr_tsd F - td_thr_validate F -GLIBC_2.2.3 - GLIBC_2.2.3 A - td_symbol_list F -GLIBC_2.3 - GLIBC_2.3 A - td_thr_tls_get_addr F -GLIBC_2.3.3 - GLIBC_2.3.3 A - td_thr_tlsbase F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist deleted file mode 100644 index 7422687e3c..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libutil.abilist +++ /dev/null @@ -1,8 +0,0 @@ -GLIBC_2.0 - GLIBC_2.0 A - forkpty F - login F - login_tty F - logout F - logwtmp F - openpty F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S index 3e17585b6b..42066ab8eb 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/setcontext.S @@ -1,5 +1,5 @@ /* Jump to a new context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S index 1a9d312b7e..7c67c6e6c5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and jump to a new context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise.c index 98a76c4328..d9160691b3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. +/* Copyright (C) 2003-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c index bff8c96a23..ead0d2c59c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/posix_fadvise64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. +/* Copyright (C) 2003-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c index 35ac9c2159..f6b7f43f3f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -23,35 +23,11 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <kernel-features.h> - ssize_t -__libc_pread (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off_t offset; +__libc_pread (int fd, void *buf, size_t count, off_t offset) { - ssize_t result; - - if (SINGLE_THREAD_P) - { - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, buf, count, - 0, offset >> 31, offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, buf, count, - 0, offset >> 31, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; + return SYSCALL_CANCEL (pread, fd, buf, count, 0, offset >> 31, offset); } strong_alias (__libc_pread, __pread) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c index 399419b83c..75ee34bcce 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -22,38 +22,13 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <kernel-features.h> - ssize_t -__libc_pread64 (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off64_t offset; +__libc_pread64 (int fd, void *buf, size_t count, off64_t offset) { - ssize_t result; - - if (SINGLE_THREAD_P) - { - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, buf, count, - 0, (long) (offset >> 32), - (long) offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pread, 6, fd, buf, count, - 0, (long) (offset >> 32), - (long) offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; + return SYSCALL_CANCEL (pread, fd, buf, count, 0, (long) (offset >> 32), + (long) offset); } weak_alias (__libc_pread64, __pread64) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c index 77d39cfcec..fc822d7c8d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -23,36 +23,12 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <kernel-features.h> - ssize_t -__libc_pwrite (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off_t offset; +__libc_pwrite (int fd, const void *buf, size_t count, off_t offset) { - ssize_t result; - - if (SINGLE_THREAD_P) - { - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, - 0, offset >> 31, offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, - 0, offset >> 31, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; + return SYSCALL_CANCEL (pwrite, fd, buf, count, 0, offset >> 31, offset); } strong_alias (__libc_pwrite, __pwrite) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c index 02e9919323..dbeaed8775 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/pwrite64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -22,38 +22,13 @@ #include <sysdep-cancel.h> #include <sys/syscall.h> -#include <kernel-features.h> - ssize_t -__libc_pwrite64 (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off64_t offset; +__libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) { - ssize_t result; - - if (SINGLE_THREAD_P) - { - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, - 0, (long) (offset >> 32), - (long) offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - /* On PPC32 64bit values are aligned in odd/even register pairs. */ - result = INLINE_SYSCALL (pwrite, 6, fd, buf, count, - 0, (long) (offset >> 32), - (long) offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; + return SYSCALL_CANCEL (pwrite, fd, buf, count, 0, (long) (offset >> 32), + (long) offset); } weak_alias (__libc_pwrite64, __pwrite64) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S index 96a2067360..09b144d6b8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S @@ -1,5 +1,5 @@ /* Jump to a new context powerpc32 common. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S index ce0096772a..f96f84092c 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S @@ -1,5 +1,5 @@ /* Jump to a new context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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 @@ -19,7 +19,6 @@ #include <sysdep.h> #include <rtld-global-offsets.h> #include <shlib-compat.h> -#include <kernel-features.h> #define __ASSEMBLY__ #include <asm/ptrace.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S deleted file mode 100644 index 226148419d..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S +++ /dev/null @@ -1,118 +0,0 @@ -/* 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 - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <sysdep-cancel.h> -#include <socketcall.h> - -#define P(a, b) P2(a, b) -#define P2(a, b) a##b - -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. - - The .S files for the other calls just #define socket and #include this. - They also #define a 'number-of-arguments' word in NARGS, which - defaults to 3. */ - -#ifndef NARGS -#ifdef socket -#error NARGS not defined -#endif -#define NARGS 3 -#endif - -/* 0(r1) and 4(r1) are reserved by the ABI, 8(r1), 12(r1), 16(r1) are used - for temp saves. 44(r1) is used to save r30. */ -#define stackblock 20 - -#ifndef __socket -# ifndef NO_WEAK_ALIAS -# define __socket P(__,socket) -# else -# define __socket socket -# endif -#endif - - .text -ENTRY(__socket) - stwu r1,-48(r1) - cfi_adjust_cfa_offset(48) -#if NARGS >= 1 - stw r3,stackblock(r1) -#endif -#if NARGS >= 2 - stw r4,4+stackblock(r1) -#endif -#if NARGS >= 3 - stw r5,8+stackblock(r1) -#endif -#if NARGS >= 4 - stw r6,12+stackblock(r1) -#endif -#if NARGS >= 5 - stw r7,16+stackblock(r1) -#endif -#if NARGS >= 6 - stw r8,20+stackblock(r1) -#endif -#if NARGS >= 7 -#error too many arguments! -#endif - -#if defined NEED_CANCELLATION && defined CENABLE - SINGLE_THREAD_P - bne- .Lsocket_cancel -#endif - - li r3,P(SOCKOP_,socket) - addi r4,r1,stackblock - DO_CALL(SYS_ify(socketcall)) - addi r1,r1,48 - PSEUDO_RET - -#if defined NEED_CANCELLATION && defined CENABLE -.Lsocket_cancel: - mflr r9 - stw r9,52(r1) - cfi_offset (lr, 4) - CENABLE - stw r3,16(r1) - li r3,P(SOCKOP_,socket) - addi r4,r1,stackblock - DO_CALL(SYS_ify(socketcall)) - mfcr r0 - stw r3,8(r1) - stw r0,12(r1) - lwz r3,16(r1) - CDISABLE - lwz r4,52(r1) - lwz r0,12(r1) - lwz r3,8(r1) - mtlr r4 - mtcr r0 - addi r1,r1,48 - PSEUDO_RET -#endif - -PSEUDO_END (__socket) - -#ifndef NO_WEAK_ALIAS -weak_alias (__socket, socket) -#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S index 8544c28232..d2681bd0e0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S @@ -1,5 +1,5 @@ /* Save current context and jump to a new context. - Copyright (C) 2005-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 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 @@ -301,14 +301,9 @@ ENTRY(__CONTEXT_FUNC_NAME) # ifdef PIC mflr r8 -# ifdef HAVE_ASM_PPC_REL16 SETUP_GOT_ACCESS(r7,got_label) addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l -# else - bl _GLOBAL_OFFSET_TABLE_@local-4 - mflr r7 -# endif mtlr r8 # ifdef SHARED lwz r7,_rtld_global_ro@got(r7) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S index 007fab7562..dc44a91e8f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and jump to a new context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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 @@ -19,7 +19,6 @@ #include <sysdep.h> #include <rtld-global-offsets.h> #include <shlib-compat.h> -#include <kernel-features.h> #define __ASSEMBLY__ #include <asm/ptrace.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list index aaa3557831..451d50884b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list @@ -1,8 +1,11 @@ # File name Caller Syscall name # args Strong name Weak names +chown - chown i:sii __chown chown@@GLIBC_2.1 +lchown - lchown i:sii __lchown lchown@@GLIBC_2.0 chown@GLIBC_2.0 + # System calls with wrappers. oldgetrlimit EXTRA getrlimit i:ip __old_getrlimit getrlimit@GLIBC_2.0 -oldsetrlimit EXTRA setrlimit i:ip __old_setrlimit setrlimit@GLIBC_2.0 +setrlimit - setrlimit i:ip __setrlimit setrlimit@GLIBC_2.0 setrlimit@@GLIBC_2.2 # Due to 64bit alignment there is a dummy second parameter readahead - readahead i:iiiii __readahead readahead diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h new file mode 100644 index 0000000000..dd9ff1c077 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h @@ -0,0 +1,118 @@ +/* Cancellable system call stubs. Linux/PowerPC version. + Copyright (C) 2003-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>, 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <tls.h> +#ifndef __ASSEMBLER__ +# include <nptl/pthreadP.h> +#endif + +#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .section ".text"; \ + ENTRY (name) \ + SINGLE_THREAD_P; \ + bne- .Lpseudo_cancel; \ + .type __##syscall_name##_nocancel,@function; \ + .globl __##syscall_name##_nocancel; \ + __##syscall_name##_nocancel: \ + DO_CALL (SYS_ify (syscall_name)); \ + PSEUDO_RET; \ + .size __##syscall_name##_nocancel,.-__##syscall_name##_nocancel; \ + .Lpseudo_cancel: \ + stwu 1,-48(1); \ + cfi_adjust_cfa_offset (48); \ + mflr 9; \ + stw 9,52(1); \ + cfi_offset (lr, 4); \ + DOCARGS_##args; /* save syscall args around CENABLE. */ \ + CENABLE; \ + stw 3,16(1); /* store CENABLE return value (MASK). */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + DO_CALL (SYS_ify (syscall_name)); \ + mfcr 0; /* save CR/R3 around CDISABLE. */ \ + stw 3,8(1); \ + stw 0,12(1); \ + lwz 3,16(1); /* pass MASK to CDISABLE. */ \ + CDISABLE; \ + lwz 4,52(1); \ + lwz 0,12(1); /* restore CR/R3. */ \ + lwz 3,8(1); \ + mtlr 4; \ + mtcr 0; \ + addi 1,1,48; + +# define DOCARGS_0 +# define UNDOCARGS_0 + +# define DOCARGS_1 stw 3,20(1); DOCARGS_0 +# define UNDOCARGS_1 lwz 3,20(1); UNDOCARGS_0 + +# define DOCARGS_2 stw 4,24(1); DOCARGS_1 +# define UNDOCARGS_2 lwz 4,24(1); UNDOCARGS_1 + +# define DOCARGS_3 stw 5,28(1); DOCARGS_2 +# define UNDOCARGS_3 lwz 5,28(1); UNDOCARGS_2 + +# define DOCARGS_4 stw 6,32(1); DOCARGS_3 +# define UNDOCARGS_4 lwz 6,32(1); UNDOCARGS_3 + +# define DOCARGS_5 stw 7,36(1); DOCARGS_4 +# define UNDOCARGS_5 lwz 7,36(1); UNDOCARGS_4 + +# define DOCARGS_6 stw 8,40(1); DOCARGS_5 +# define UNDOCARGS_6 lwz 8,40(1); UNDOCARGS_5 + +# if IS_IN (libpthread) +# define CENABLE bl __pthread_enable_asynccancel@local +# define CDISABLE bl __pthread_disable_asynccancel@local +# elif IS_IN (libc) +# define CENABLE bl __libc_enable_asynccancel@local +# define CDISABLE bl __libc_disable_asynccancel@local +# elif IS_IN (librt) +# define CENABLE bl __librt_enable_asynccancel@local +# define CDISABLE bl __librt_disable_asynccancel@local +# else +# error Unsupported library +# endif + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# define SINGLE_THREAD_P \ + lwz 10,MULTIPLE_THREADS_OFFSET(2); \ + cmpwi 10,0 +# endif + +#elif !defined __ASSEMBLER__ + +# define SINGLE_THREAD_P (1) +# define NO_CANCELLATION 1 + +#endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index 8feafb8082..dc56bea49a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 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 @@ -50,77 +50,6 @@ # include <errno.h> -# ifdef SHARED -# define INLINE_VSYSCALL(name, nr, args...) \ - ({ \ - __label__ out; \ - __label__ iserr; \ - INTERNAL_SYSCALL_DECL (sc_err); \ - long int sc_ret; \ - \ - if (__vdso_##name != NULL) \ - { \ - sc_ret = \ - INTERNAL_VSYSCALL_NCS (__vdso_##name, sc_err, long int, nr, ##args);\ - if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ - goto out; \ - if (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err) != ENOSYS) \ - goto iserr; \ - } \ - \ - sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, ##args); \ - if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ - { \ - iserr: \ - __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \ - sc_ret = -1L; \ - } \ - out: \ - sc_ret; \ - }) -# else -# define INLINE_VSYSCALL(name, nr, args...) \ - INLINE_SYSCALL (name, nr, ##args) -# endif - -# ifdef SHARED -# define INTERNAL_VSYSCALL(name, err, nr, args...) \ - ({ \ - __label__ out; \ - long int v_ret; \ - \ - if (__vdso_##name != NULL) \ - { \ - v_ret = \ - INTERNAL_VSYSCALL_NCS (__vdso_##name, err, long int, nr, ##args); \ - if (!INTERNAL_SYSCALL_ERROR_P (v_ret, err) \ - || INTERNAL_SYSCALL_ERRNO (v_ret, err) != ENOSYS) \ - goto out; \ - } \ - v_ret = INTERNAL_SYSCALL (name, err, nr, ##args); \ - out: \ - v_ret; \ - }) -# else -# define INTERNAL_VSYSCALL(name, err, nr, args...) \ - INTERNAL_SYSCALL (name, err, nr, ##args) -# endif - -# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \ - ({ \ - type sc_ret = ENOSYS; \ - \ - if (__vdso_##name != NULL) \ - sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, type, nr, ##args); \ - else \ - err = 1 << 28; \ - sc_ret; \ - }) - -/* List of system calls which are supported as vsyscalls. */ -# define HAVE_CLOCK_GETRES_VSYSCALL 1 -# define HAVE_CLOCK_GETTIME_VSYSCALL 1 - /* Define a macro which expands inline into the wrapper code for a VDSO call. This use is for internal calls that do not need to handle errors normally. It will never touch errno. @@ -128,7 +57,7 @@ function call, with the exception of LR (which is needed for the "sc; bnslr+" sequence) and CR (where only CR0.SO is clobbered to signal an error return status). */ -# define INTERNAL_VSYSCALL_NCS(funcptr, err, type, nr, args...) \ +# define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, type, args...) \ ({ \ register void *r0 __asm__ ("r0"); \ register long int r3 __asm__ ("r3"); \ @@ -155,6 +84,9 @@ rval; \ }) +#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ + INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, nr, long int, args) + # undef INLINE_SYSCALL # define INLINE_SYSCALL(name, nr, args...) \ ({ \ @@ -194,6 +126,7 @@ register long int r11 __asm__ ("r11"); \ register long int r12 __asm__ ("r12"); \ LOADARGS_##nr(name, args); \ + ABORT_TRANSACTION; \ __asm__ __volatile__ \ ("sc \n\t" \ "mfcr %0" \ @@ -215,6 +148,26 @@ # undef INTERNAL_SYSCALL_ERRNO # define INTERNAL_SYSCALL_ERRNO(val, err) (val) +# define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \ + ({ \ + type sc_ret = ENOSYS; \ + \ + __typeof (__vdso_##name) vdsop = __vdso_##name; \ + PTR_DEMANGLE (vdsop); \ + if (vdsop != NULL) \ + sc_ret = \ + INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, nr, type, ##args); \ + else \ + err = 1 << 28; \ + sc_ret; \ + }) + +/* List of system calls which are supported as vsyscalls. */ +# define HAVE_CLOCK_GETRES_VSYSCALL 1 +# define HAVE_CLOCK_GETTIME_VSYSCALL 1 +# define HAVE_GETCPU_VSYSCALL 1 + + # define LOADARGS_0(name, dummy) \ r0 = name # define LOADARGS_1(name, __arg1) \ @@ -272,7 +225,7 @@ /* Pointer mangling support. */ -#if defined NOT_IN_libc && defined IS_IN_rtld +#if IS_IN (rtld) /* We cannot use the thread descriptor because in ld.so we use setjmp earlier than the descriptor is initialized. */ #else diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c index 1d96e1de1b..deb7004ce7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/truncate64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S index 7a1e8422ad..ccb5aea4b3 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. +/* Copyright (C) 2003-2015 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 @@ -18,7 +18,7 @@ #include <sysdep.h> #define _ERRNO_H 1 #include <bits/errno.h> -#include <kernel-features.h> +#include <tcb-offsets.h> /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -26,9 +26,39 @@ and the process ID of the new process to the old process. */ ENTRY (__vfork) + + /* Load the TCB-cached PID value and negates it. If It it is zero + sets it to 0x800000. And then sets its value again on TCB field. + See raise.c for the logic that relies on this value. */ + + lwz r0,PID(r2) + cmpwi cr0,r0,0 + neg r0,r0 + bne- cr0,1f + lis r0,0x8000 +1: stw r0,PID(r2) + DO_CALL (SYS_ify (vfork)) + + cmpwi cr1,r3,0 + beqlr- 1 + + /* Restore the original value of the TCB cache of the PID, if we're + the parent. But in the child (syscall return value equals zero), + leave things as they are. */ + lwz r0,PID(r2) + /* Cannot use clrlwi. here, because cr0 needs to be preserved + until PSEUDO_RET. */ + clrlwi r4,r0,1 + cmpwi cr1,r4,0 + beq- cr1,1f + neg r4,r0 +1: stw r4,PID(r2) + PSEUDO_RET + PSEUDO_END (__vfork) libc_hidden_def (__vfork) weak_alias (__vfork, vfork) +strong_alias (__vfork, __libc_vfork) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions index 16d7128057..a8e88b89db 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions @@ -23,3 +23,21 @@ libc { __ppc_get_timebase_freq; } } + +librt { + GLIBC_2.3.3 { + # Changed timer_t. + timer_create; timer_delete; timer_getoverrun; timer_gettime; + timer_settime; + } +} + +libpthread { + GLIBC_2.3.4 { + longjmp; siglongjmp; + } + GLIBC_2.6 { + # Changed PTHREAD_STACK_MIN. + pthread_attr_setstack; pthread_attr_setstacksize; + } +} diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S index dc9c8540ff..00d1918e50 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/____longjmp_chk.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2014 Free Software Foundation, Inc. +/* Copyright (C) 2009-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S index 30f66a83ad..544afe207e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S @@ -1,5 +1,5 @@ /* brk system call for Linux. PowerPC64 version. - Copyright (C) 1995-2014 Free Software Foundation, Inc. + Copyright (C) 1995-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/c++-types.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64/c++-types.data index 23c11dc41b..23c11dc41b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/c++-types.data +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/c++-types.data diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S index d8fefdd3b4..f2312a708f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S @@ -1,5 +1,5 @@ /* Wrapper around clone system call. PowerPC64 version. - Copyright (C) 1997-2014 Free Software Foundation, Inc. + Copyright (C) 1997-2015 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 @@ -41,14 +41,10 @@ ENTRY (__clone) beq- cr0,L(badargs) /* Save some regs in the "red zone". */ -#ifdef RESET_PID std r29,-24(r1) -#endif std r30,-16(r1) std r31,-8(r1) -#ifdef RESET_PID cfi_offset(r29,-24) -#endif cfi_offset(r30,-16) cfi_offset(r31,-8) @@ -59,15 +55,13 @@ ENTRY (__clone) /* Save fn, args, stack across syscall. */ mr r30,r3 /* Function in r30. */ -#ifdef RESET_PID mr r29,r5 /* Flags in r29. */ -#endif mr r31,r6 /* Argument in r31. */ /* 'flags' argument is first parameter to clone syscall. Second is the stack pointer, already in r4. */ mr r3,r5 - /* Move the parent_tid, child_tid and tls arguments. */ + /* Move the parent_tid, child_tid and tls arguments. */ mr r5,r7 mr r6,r8 mr r7,r9 @@ -84,7 +78,6 @@ ENTRY (__clone) crandc cr1*4+eq,cr1*4+eq,cr0*4+so bne- cr1,L(parent) /* The '-' is to minimise the race. */ -#ifdef RESET_PID andis. r0,r29,CLONE_THREAD>>16 bne+ cr0,L(oldpid) andi. r0,r29,CLONE_VM @@ -95,7 +88,6 @@ L(nomoregetpid): stw r3,TID(r13) stw r3,PID(r13) L(oldpid): -#endif std r2,FRAME_TOC_SAVE(r1) /* Call procedure. */ @@ -120,21 +112,16 @@ L(badargs): L(parent): /* Parent. Restore registers & return. */ -#ifdef RESET_PID cfi_offset(r29,-24) -#endif cfi_offset(r30,-16) cfi_offset(r31,-8) -#ifdef RESET_PID ld r29,-24(r1) -#endif ld r30,-16(r1) ld r31,-8(r1) -#ifdef RESET_PID cfi_restore(r29) -#endif cfi_restore(r30) cfi_restore(r31) + PSEUDO_RET END (__clone) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure index fbb6334a90..70bb18ad51 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure @@ -1,6 +1,19 @@ # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/. +test -n "$libc_cv_slibdir" || +case "$prefix" in +/usr | /usr/) + libc_cv_slibdir=/lib64 + libc_cv_rtlddir=/lib64 + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; + # Locale data can be shared between 32-bit and 64-bit libraries. + libc_cv_localedir='${exec_prefix}/lib/locale' + fi + ;; +esac + # Define default-abi according to compiler flags. @@ -20,7 +33,7 @@ do 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 + as_fn_executable_p "$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 @@ -86,7 +99,7 @@ do 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 + as_fn_executable_p "$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 @@ -160,7 +173,37 @@ $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" + # For shlib-versions. + $as_echo "#define HAVE_ELFV2_ABI 1" >>confdefs.h + else config_vars="$config_vars default-abi = 64-v1" + # Compiler that do not support ELFv2 ABI does not define _CALL_ELF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler defines _CALL_ELF" >&5 +$as_echo_n "checking whether the compiler defines _CALL_ELF... " >&6; } +if ${libc_cv_ppc64_def_call_elf+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _CALL_ELF + yes + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + libc_cv_ppc64_def_call_elf=yes +else + libc_cv_ppc64_def_call_elf=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_def_call_elf" >&5 +$as_echo "$libc_cv_ppc64_def_call_elf" >&6; } + if test $libc_cv_ppc64_def_call_elf = no; then + libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1" + fi fi diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac index c9cd4bc8fd..0822915c43 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac @@ -1,6 +1,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/. +LIBC_SLIBDIR_RTLDDIR([lib64], [lib64]) + # Define default-abi according to compiler flags. AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI], [libc_cv_ppc64_elfv2_abi], @@ -10,6 +12,18 @@ AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI], ], 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]) + # For shlib-versions. + AC_DEFINE(HAVE_ELFV2_ABI) else LIBC_CONFIG_VAR([default-abi], [64-v1]) + # Compiler that do not support ELFv2 ABI does not define _CALL_ELF + AC_CACHE_CHECK([whether the compiler defines _CALL_ELF], + [libc_cv_ppc64_def_call_elf], + [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF + yes + #endif + ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) + if test $libc_cv_ppc64_def_call_elf = no; then + libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1" + fi fi diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h index 06571464a4..58e0576f04 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/dl-cache.h +++ b/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-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c index a9252d7d35..69031bad94 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2014 Free Software Foundation, Inc. +/* Copyright (C) 2000-2015 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 @@ -53,16 +53,10 @@ __libc_fcntl (int fd, int cmd, ...) if (cmd >= F_GETLK64 && cmd <= F_SETLKW64) cmd -= F_GETLK64 - F_GETLK; - if (SINGLE_THREAD_P || cmd != F_SETLKW) + if (cmd != F_SETLKW) return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg); - int oldtype = LIBC_CANCEL_ASYNC (); - - int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg); - - LIBC_CANCEL_RESET (oldtype); - - return result; + return SYSCALL_CANCEL (fcntl, fd, cmd, arg); } libc_hidden_def (__libc_fcntl) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c index 35fc58421a..64a9edfddc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_mask.c +++ b/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-2014 Free Software Foundation, Inc. + Copyright (C) 2007-2015 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,7 +21,6 @@ #include <sysdep.h> #include <sys/syscall.h> #include <sys/prctl.h> -#include <kernel-features.h> const fenv_t * __fe_mask_env (void) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c index c6c156ce78..4d5553a7db 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/fpu/fe_nomask.c +++ b/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-2014 Free Software Foundation, Inc. + Copyright (C) 2003-2015 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,7 +21,6 @@ #include <sysdep.h> #include <sys/syscall.h> #include <sys/prctl.h> -#include <kernel-features.h> #include <shlib-compat.h> const fenv_t * diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S index 85ae1c8666..390739d67b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S @@ -1,5 +1,5 @@ /* Save current context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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 @@ -19,7 +19,6 @@ #include <sysdep.h> #include <rtld-global-offsets.h> #include <shlib-compat.h> -#include <kernel-features.h> #define __ASSEMBLY__ #include <asm/ptrace.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h index df98736860..d0e4a9f5b6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/kernel_stat.h @@ -1,5 +1,5 @@ /* Definition of `struct stat' used in the kernel. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist index 3530fb4878..3174e2186f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld-le.abilist @@ -9,3 +9,6 @@ GLIBC_2.17 free F malloc F realloc F +GLIBC_2.22 + GLIBC_2.22 A + __tls_get_addr_opt F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist index 899360e7d7..d8c42016fe 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/ld.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ld.abilist @@ -1,3 +1,6 @@ +GLIBC_2.22 + GLIBC_2.22 A + __tls_get_addr_opt F GLIBC_2.3 GLIBC_2.3 A __libc_memalign F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h index 491db8f719..3d3c3b36a0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ldsodefs.h +++ b/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-2014 Free Software Foundation, Inc. + Copyright (C) 2005-2015 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/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libBrokenLocale-le.abilist index 92c43d9b79..92c43d9b79 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libBrokenLocale-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libBrokenLocale.abilist index 2aca6ea59b..2aca6ea59b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libBrokenLocale.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libBrokenLocale.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libanl-le.abilist index 0d32f2ed47..0d32f2ed47 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libanl-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libanl.abilist index 70ab17be50..70ab17be50 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libanl.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libanl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist index 20eac4e850..c0b39854eb 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist @@ -2169,3 +2169,6 @@ GLIBC_2.17 GLIBC_2.18 GLIBC_2.18 A __cxa_thread_atexit_impl F +GLIBC_2.22 + GLIBC_2.22 A + fmemopen F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist index 195b58757b..e58a00d939 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist @@ -90,6 +90,9 @@ GLIBC_2.17 GLIBC_2.18 GLIBC_2.18 A __cxa_thread_atexit_impl F +GLIBC_2.22 + GLIBC_2.22 A + fmemopen F GLIBC_2.3 GLIBC_2.3 A _Exit F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libcrypt-le.abilist index 177c536209..177c536209 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libcrypt-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libcrypt.abilist index a11230a025..a11230a025 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libcrypt.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libcrypt.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libdl-le.abilist index 6caff88266..6caff88266 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libdl-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libdl.abilist index 399f6a814a..399f6a814a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libdl.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libdl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist index a820074ab6..a820074ab6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist index d309a6fa1a..d309a6fa1a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libnsl-le.abilist index 763b8dc166..763b8dc166 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libnsl-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libnsl.abilist index 76e904d7c7..76e904d7c7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libnsl.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libnsl.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist index 5520312635..5520312635 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist index 0faa1b8054..0faa1b8054 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libpthread.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libresolv-le.abilist index ed312c0e6e..ed312c0e6e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libresolv-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libresolv.abilist index 63e23cb7dd..63e23cb7dd 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libresolv.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libresolv.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt-le.abilist index f89f83ea86..f89f83ea86 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt.abilist index 772bd119a8..772bd119a8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/librt.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libthread_db-le.abilist index 52f8d0793b..52f8d0793b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libthread_db-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libthread_db.abilist index 9a267e6d00..9a267e6d00 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libthread_db.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libthread_db.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libutil-le.abilist index 7e75bb2ea8..7e75bb2ea8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil-le.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libutil-le.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libutil.abilist index 1829c23575..1829c23575 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libutil.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libutil.abilist diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data new file mode 100644 index 0000000000..49d5de6019 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/localplt.data @@ -0,0 +1,14 @@ +libc.so: calloc +libc.so: free +libc.so: malloc +libc.so: memalign +libc.so: realloc +libm.so: matherr +# The dynamic loader uses __libc_memalign internally to allocate aligned +# TLS storage. The other malloc family of functions are expected to +# allow user symbol interposition. +ld.so: __libc_memalign +ld.so: malloc +ld.so: calloc +ld.so: realloc +ld.so: free diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S index e22f5a6955..0429f6d7be 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S @@ -1,5 +1,5 @@ /* Create new context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -17,7 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <kernel-features.h> #define __ASSEMBLY__ #include <asm/ptrace.h> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data deleted file mode 100644 index 2219aa9048..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data +++ /dev/null @@ -1,6 +0,0 @@ -libc.so: calloc -libc.so: free -libc.so: malloc -libc.so: memalign -libc.so: realloc -libm.so: matherr diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c deleted file mode 100644 index 4824010bf7..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread.c +++ /dev/null @@ -1,57 +0,0 @@ -/* 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. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <assert.h> -#include <errno.h> -#include <unistd.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> - -#include <kernel-features.h> - - -/* Consider moving to syscalls.list. */ - -ssize_t -__libc_pread (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off_t offset; -{ - ssize_t result; - - if (SINGLE_THREAD_P) - { - result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - - result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} - -strong_alias (__libc_pread, __pread) -weak_alias (__libc_pread, pread) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c deleted file mode 100644 index 2f915805dc..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pread64.c +++ /dev/null @@ -1,56 +0,0 @@ -/* 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. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> - -#include <kernel-features.h> - - -/* Consider moving to syscalls.list. */ - -ssize_t -__libc_pread64 (fd, buf, count, offset) - int fd; - void *buf; - size_t count; - off64_t offset; -{ - ssize_t result; - - if (SINGLE_THREAD_P) - { - result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - - result = INLINE_SYSCALL (pread, 4, fd, buf, count, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} - -weak_alias (__libc_pread64, __pread64) -weak_alias (__libc_pread64, pread64) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c deleted file mode 100644 index cc62a50ea3..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite.c +++ /dev/null @@ -1,57 +0,0 @@ -/* 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. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <assert.h> -#include <errno.h> -#include <unistd.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> - -#include <kernel-features.h> - - -/* Consider moving to syscalls.list. */ - -ssize_t -__libc_pwrite (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off_t offset; -{ - ssize_t result; - - if (SINGLE_THREAD_P) - { - result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - - result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} - -strong_alias (__libc_pwrite, __pwrite) -weak_alias (__libc_pwrite, pwrite) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c deleted file mode 100644 index a8543977f2..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/pwrite64.c +++ /dev/null @@ -1,57 +0,0 @@ -/* 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. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#include <errno.h> -#include <unistd.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> - -#include <kernel-features.h> - - -/* Consider moving to syscalls.list. */ - -ssize_t -__libc_pwrite64 (fd, buf, count, offset) - int fd; - const void *buf; - size_t count; - off64_t offset; -{ - ssize_t result; - - if (SINGLE_THREAD_P) - { - result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); - - return result; - } - - int oldtype = LIBC_CANCEL_ASYNC (); - - result = INLINE_SYSCALL (pwrite, 4, fd, buf, count, offset); - - LIBC_CANCEL_RESET (oldtype); - - return result; -} - -weak_alias (__libc_pwrite64, __pwrite64) -libc_hidden_weak (__pwrite64) -weak_alias (__libc_pwrite64, pwrite64) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S index 0cb84dcbaf..8a08dc4a8b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S @@ -1,5 +1,5 @@ /* Switch to context. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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 @@ -19,7 +19,6 @@ #include <sysdep.h> #include <rtld-global-offsets.h> #include <shlib-compat.h> -#include <kernel-features.h> #define __ASSEMBLY__ #include <asm/ptrace.h> @@ -82,22 +81,31 @@ ENTRY(__novec_setcontext) # ifdef _ARCH_PWR6 /* Use the extended four-operand version of the mtfsf insn. */ - mtfsf 0xff,fp0,1,0 -# else .machine push .machine "power6" + + mtfsf 0xff,fp0,1,0 + + .machine pop +# else /* Availability of DFP indicates a 64-bit FPSCR. */ andi. r6,r5,PPC_FEATURE_HAS_DFP beq 5f /* Use the extended four-operand version of the mtfsf insn. */ + .machine push + .machine "power6" + mtfsf 0xff,fp0,1,0 + + .machine pop + b 6f /* Continue to operate on the FPSCR as if it were 32-bits. */ 5: mtfsf 0xff,fp0 6: - .machine pop # endif /* _ARCH_PWR6 */ + lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) @@ -365,22 +373,31 @@ L(has_no_vec): # ifdef _ARCH_PWR6 /* Use the extended four-operand version of the mtfsf insn. */ - mtfsf 0xff,fp0,1,0 -# else .machine push .machine "power6" + + mtfsf 0xff,fp0,1,0 + + .machine pop +# else /* Availability of DFP indicates a 64-bit FPSCR. */ andi. r6,r5,PPC_FEATURE_HAS_DFP beq 7f /* Use the extended four-operand version of the mtfsf insn. */ + .machine push + .machine "power6" + mtfsf 0xff,fp0,1,0 + + .machine pop + b 8f /* Continue to operate on the FPSCR as if it were 32-bits. */ 7: mtfsf 0xff,fp0 8: - .machine pop # endif /* _ARCH_PWR6 */ + lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions new file mode 100644 index 0000000000..bc6debaf69 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/shlib-versions @@ -0,0 +1,7 @@ +%ifdef HAVE_ELFV2_ABI +DEFAULT GLIBC_2.17 +ld=ld64.so.2 +%else +DEFAULT GLIBC_2.3 +ld=ld64.so.1 +%endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S deleted file mode 100644 index 2a253e18c5..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S +++ /dev/null @@ -1,134 +0,0 @@ -/* 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 - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 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 - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If not, - see <http://www.gnu.org/licenses/>. */ - -#include <sysdep-cancel.h> -#include <socketcall.h> - -#define P(a, b) P2(a, b) -#define P2(a, b) a##b - -/* The socket-oriented system calls are handled unusally in Linux. - They are all gated through the single `socketcall' system call number. - `socketcall' takes two arguments: the first is the subcode, specifying - which socket function is being called; and the second is a pointer to - the arguments to the specific function. - - The .S files for the other calls just #define socket and #include this. - They also #define a 'number-of-arguments' word in NARGS, which - defaults to 3. */ - -#ifndef NARGS -#ifdef socket -#error NARGS not defined -#endif -#define NARGS 3 -#endif - -#ifndef __socket -# ifndef NO_WEAK_ALIAS -# define __socket P(__,socket) -# else -# define __socket socket -# endif -#endif - -#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) - CALL_MCOUNT NARGS - stdu r1,-FRAMESIZE(r1) - cfi_adjust_cfa_offset(FRAMESIZE) -#if NARGS >= 1 - std r3,stackblock(r1) -#endif -#if NARGS >= 2 - std r4,8+stackblock(r1) -#endif -#if NARGS >= 3 - std r5,16+stackblock(r1) -#endif -#if NARGS >= 4 - std r6,24+stackblock(r1) -#endif -#if NARGS >= 5 - std r7,32+stackblock(r1) -#endif -#if NARGS >= 6 - std r8,40+stackblock(r1) -#endif -#if NARGS >= 7 - std r9,48+stackblock(r1) -#endif -#if NARGS >= 8 - std r10,56+stackblock(r1) -#endif -#if NARGS >= 9 -#error too many arguments! -#endif - -#if defined NEED_CANCELLATION && defined CENABLE - SINGLE_THREAD_P - bne- .Lsocket_cancel -#endif - - li r3,P(SOCKOP_,socket) - addi r4,r1,stackblock - DO_CALL(SYS_ify(socketcall)) - addi r1,r1,FRAMESIZE - cfi_adjust_cfa_offset(-FRAMESIZE) - PSEUDO_RET - -#if defined NEED_CANCELLATION && defined CENABLE -.Lsocket_cancel: - cfi_adjust_cfa_offset(FRAMESIZE) - mflr r9 - std r9,FRAMESIZE+FRAME_LR_SAVE(r1) - cfi_offset (lr, FRAME_LR_SAVE) - CENABLE - 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,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+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 - cfi_adjust_cfa_offset(-FRAMESIZE) - cfi_restore(lr) - cfi_restore(cr) - PSEUDO_RET -#endif -PSEUDO_END (__socket) - -#ifndef NO_WEAK_ALIAS -weak_alias (__socket, socket) -#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S index 1d92eb456a..2421ca400b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S @@ -1,5 +1,5 @@ /* Save current context and install the given one. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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 @@ -19,7 +19,6 @@ #include <sysdep.h> #include <rtld-global-offsets.h> #include <shlib-compat.h> -#include <kernel-features.h> #define __ASSEMBLY__ #include <asm/ptrace.h> @@ -174,24 +173,34 @@ ENTRY(__novec_swapcontext) lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) + # ifdef _ARCH_PWR6 /* Use the extended four-operand version of the mtfsf insn. */ - mtfsf 0xff,fp0,1,0 -# else .machine push .machine "power6" + + mtfsf 0xff,fp0,1,0 + + .machine pop +# else /* Availability of DFP indicates a 64-bit FPSCR. */ andi. r6,r8,PPC_FEATURE_HAS_DFP beq 5f - /* Use the extended four-operand version of the mtfsf insn. */ + + .machine push + .machine "power6" + mtfsf 0xff,fp0,1,0 + + .machine pop + b 6f /* Continue to operate on the FPSCR as if it were 32-bits. */ 5: mtfsf 0xff,fp0 6: - .machine pop #endif /* _ARCH_PWR6 */ + lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) @@ -653,24 +662,34 @@ L(has_no_vec2): lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) + # ifdef _ARCH_PWR6 /* Use the extended four-operand version of the mtfsf insn. */ - mtfsf 0xff,fp0,1,0 -# else .machine push .machine "power6" + + mtfsf 0xff,fp0,1,0 + + .machine pop +# else /* Availability of DFP indicates a 64-bit FPSCR. */ andi. r6,r8,PPC_FEATURE_HAS_DFP beq 7f - /* Use the extended four-operand version of the mtfsf insn. */ + + .machine push + .machine "power6" + mtfsf 0xff,fp0,1,0 + + .machine pop + b 8f /* Continue to operate on the FPSCR as if it were 32-bits. */ 7: mtfsf 0xff,fp0 8: - .machine pop #endif /* _ARCH_PWR6 */ + lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c index ed68705aa7..9f46458581 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sync_file_range.c @@ -1,5 +1,5 @@ /* Selective file content synch'ing. - Copyright (C) 2006-2014 Free Software Foundation, Inc. + Copyright (C) 2006-2015 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,17 +28,7 @@ int sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags) { - if (SINGLE_THREAD_P) - return INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to); - - int result; - int oldtype = LIBC_CANCEL_ASYNC (); - - result = INLINE_SYSCALL (sync_file_range2, 4, fd, flags, from, to); - - LIBC_CANCEL_RESET (oldtype); - - return result; + return SYSCALL_CANCEL (sync_file_range2, fd, flags, from, to); } #else int diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list index aee60bf9d5..6ba6f9b1e9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list @@ -1,3 +1,3 @@ # File name Caller Syscall name # args Strong name Weak names -getrlimit - ugetrlimit i:ip __getrlimit getrlimit getrlimit64 +getrlimit - ugetrlimit i:ip __getrlimit getrlimit getrlimit64 __getrlimit64 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h new file mode 100644 index 0000000000..5cd7ddb1ad --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h @@ -0,0 +1,147 @@ +/* Cancellable system call stubs. Linux/PowerPC64 version. + Copyright (C) 2003-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>, 2003. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <sysdep.h> +#include <tls.h> +#ifndef __ASSEMBLER__ +# include <nptl/pthreadP.h> +#endif + +#if IS_IN (libc) || IS_IN (libpthread) || IS_IN (librt) + +# define DASHDASHPFX(str) __##str + +#if _CALL_ELF == 2 +#define CANCEL_FRAMESIZE (FRAME_MIN_SIZE+16+48) +#define CANCEL_PARM_SAVE (FRAME_MIN_SIZE+16) +#else +#define CANCEL_FRAMESIZE (FRAME_MIN_SIZE+16) +#define CANCEL_PARM_SAVE (CANCEL_FRAMESIZE+FRAME_PARM_SAVE) +#endif + +# undef PSEUDO +# define PSEUDO(name, syscall_name, args) \ + .section ".text"; \ + ENTRY (name) \ + SINGLE_THREAD_P; \ + bne- .Lpseudo_cancel; \ + .type DASHDASHPFX(syscall_name##_nocancel),@function; \ + .globl DASHDASHPFX(syscall_name##_nocancel); \ + DASHDASHPFX(syscall_name##_nocancel): \ + DO_CALL (SYS_ify (syscall_name)); \ + PSEUDO_RET; \ + .size DASHDASHPFX(syscall_name##_nocancel),.-DASHDASHPFX(syscall_name##_nocancel); \ + .Lpseudo_cancel: \ + stdu 1,-CANCEL_FRAMESIZE(1); \ + cfi_adjust_cfa_offset (CANCEL_FRAMESIZE); \ + mflr 9; \ + std 9,CANCEL_FRAMESIZE+FRAME_LR_SAVE(1); \ + cfi_offset (lr, FRAME_LR_SAVE); \ + DOCARGS_##args; /* save syscall args around CENABLE. */ \ + CENABLE; \ + std 3,FRAME_MIN_SIZE(1); /* store CENABLE return value (MASK). */ \ + UNDOCARGS_##args; /* restore syscall args. */ \ + DO_CALL (SYS_ify (syscall_name)); \ + mfcr 0; /* save CR/R3 around CDISABLE. */ \ + std 3,FRAME_MIN_SIZE+8(1); \ + std 0,CANCEL_FRAMESIZE+FRAME_CR_SAVE(1); \ + cfi_offset (cr, FRAME_CR_SAVE); \ + ld 3,FRAME_MIN_SIZE(1); /* pass MASK to CDISABLE. */ \ + CDISABLE; \ + ld 9,CANCEL_FRAMESIZE+FRAME_LR_SAVE(1); \ + ld 0,CANCEL_FRAMESIZE+FRAME_CR_SAVE(1); /* restore CR/R3. */ \ + ld 3,FRAME_MIN_SIZE+8(1); \ + mtlr 9; \ + mtcr 0; \ + addi 1,1,CANCEL_FRAMESIZE; \ + cfi_adjust_cfa_offset (-CANCEL_FRAMESIZE); \ + cfi_restore (lr); \ + cfi_restore (cr) + +# define DOCARGS_0 +# define UNDOCARGS_0 + +# define DOCARGS_1 std 3,CANCEL_PARM_SAVE(1); DOCARGS_0 +# define UNDOCARGS_1 ld 3,CANCEL_PARM_SAVE(1); UNDOCARGS_0 + +# define DOCARGS_2 std 4,CANCEL_PARM_SAVE+8(1); DOCARGS_1 +# define UNDOCARGS_2 ld 4,CANCEL_PARM_SAVE+8(1); UNDOCARGS_1 + +# define DOCARGS_3 std 5,CANCEL_PARM_SAVE+16(1); DOCARGS_2 +# define UNDOCARGS_3 ld 5,CANCEL_PARM_SAVE+16(1); UNDOCARGS_2 + +# define DOCARGS_4 std 6,CANCEL_PARM_SAVE+24(1); DOCARGS_3 +# define UNDOCARGS_4 ld 6,CANCEL_PARM_SAVE+24(1); UNDOCARGS_3 + +# define DOCARGS_5 std 7,CANCEL_PARM_SAVE+32(1); DOCARGS_4 +# define UNDOCARGS_5 ld 7,CANCEL_PARM_SAVE+32(1); UNDOCARGS_4 + +# define DOCARGS_6 std 8,CANCEL_PARM_SAVE+40(1); DOCARGS_5 +# define UNDOCARGS_6 ld 8,CANCEL_PARM_SAVE+40(1); UNDOCARGS_5 + +# if IS_IN (libpthread) +# ifdef SHARED +# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel) +# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel) +# else +# define CENABLE bl JUMPTARGET(__pthread_enable_asynccancel); nop +# define CDISABLE bl JUMPTARGET(__pthread_disable_asynccancel); nop +# endif +# elif IS_IN (libc) +# ifdef SHARED +# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel) +# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel) +# else +# define CENABLE bl JUMPTARGET(__libc_enable_asynccancel); nop +# define CDISABLE bl JUMPTARGET(__libc_disable_asynccancel); nop +# endif +# elif IS_IN (librt) +# ifdef SHARED +# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel) +# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel) +# else +# define CENABLE bl JUMPTARGET(__librt_enable_asynccancel); nop +# define CDISABLE bl JUMPTARGET(__librt_disable_asynccancel); nop +# endif +# else +# error Unsupported library +# endif + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# define SINGLE_THREAD_P \ + lwz 10,MULTIPLE_THREADS_OFFSET(13); \ + cmpwi 10,0 +# endif + +#elif !defined __ASSEMBLER__ + +# define SINGLE_THREAD_P (1) +# define NO_CANCELLATION 1 + +#endif + +#ifndef __ASSEMBLER__ +# define RTLD_SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 9c456101ab..e2014cca39 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992-2014 Free Software Foundation, Inc. +/* Copyright (C) 1992-2015 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 @@ -61,74 +61,17 @@ #endif /* __ASSEMBLER__ */ -/* This version is for kernels that implement system calls that - behave like function calls as far as register saving. - It falls back to the syscall in the case that the vDSO doesn't - exist or fails for ENOSYS */ -#ifdef SHARED -# define INLINE_VSYSCALL(name, nr, args...) \ - ({ \ - __label__ out; \ - __label__ iserr; \ - INTERNAL_SYSCALL_DECL (sc_err); \ - long int sc_ret; \ - \ - if (__vdso_##name != NULL) \ - { \ - sc_ret = \ - INTERNAL_VSYSCALL_NCS (__vdso_##name, sc_err, long int, nr, ##args);\ - if (!INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ - goto out; \ - if (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err) != ENOSYS) \ - goto iserr; \ - } \ - \ - sc_ret = INTERNAL_SYSCALL (name, sc_err, nr, ##args); \ - if (INTERNAL_SYSCALL_ERROR_P (sc_ret, sc_err)) \ - { \ - iserr: \ - __set_errno (INTERNAL_SYSCALL_ERRNO (sc_ret, sc_err)); \ - sc_ret = -1L; \ - } \ - out: \ - sc_ret; \ - }) -#else -# define INLINE_VSYSCALL(name, nr, args...) \ - INLINE_SYSCALL (name, nr, ##args) -#endif - -#ifdef SHARED -# define INTERNAL_VSYSCALL(name, err, nr, args...) \ - ({ \ - __label__ out; \ - long int v_ret; \ - \ - if (__vdso_##name != NULL) \ - { \ - v_ret = \ - INTERNAL_VSYSCALL_NCS (__vdso_##name, err, long int, nr, ##args); \ - if (!INTERNAL_SYSCALL_ERROR_P (v_ret, err) \ - || INTERNAL_SYSCALL_ERRNO (v_ret, err) != ENOSYS) \ - goto out; \ - } \ - v_ret = INTERNAL_SYSCALL (name, err, nr, ##args); \ - out: \ - v_ret; \ - }) -#else -# define INTERNAL_VSYSCALL(name, err, nr, args...) \ - INTERNAL_SYSCALL (name, err, nr, ##args) -#endif - /* This version is for internal uses when there is no desire to set errno */ #define INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK(name, err, type, nr, args...) \ ({ \ type sc_ret = ENOSYS; \ \ - if (__vdso_##name != NULL) \ - sc_ret = INTERNAL_VSYSCALL_NCS (__vdso_##name, err, type, nr, ##args); \ + __typeof (__vdso_##name) vdsop = __vdso_##name; \ + PTR_DEMANGLE (vdsop); \ + if (vdsop != NULL) \ + sc_ret = \ + INTERNAL_VSYSCALL_CALL_TYPE (vdsop, err, type, nr, ##args); \ else \ err = 1 << 28; \ sc_ret; \ @@ -137,6 +80,7 @@ /* List of system calls which are supported as vsyscalls. */ #define HAVE_CLOCK_GETRES_VSYSCALL 1 #define HAVE_CLOCK_GETTIME_VSYSCALL 1 +#define HAVE_GETCPU_VSYSCALL 1 /* Define a macro which expands inline into the wrapper code for a system call. This use is for internal calls that do not need to handle errors @@ -144,7 +88,7 @@ gave back in the non-error (CR0.SO cleared) case, otherwise (CR0.SO set) the negation of the return value in the kernel gets reverted. */ -#define INTERNAL_VSYSCALL_NCS(funcptr, err, type, nr, args...) \ +#define INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, type, nr, args...) \ ({ \ register void *r0 __asm__ ("r0"); \ register long int r3 __asm__ ("r3"); \ @@ -168,6 +112,9 @@ rval; \ }) +#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \ + INTERNAL_VSYSCALL_CALL_TYPE(funcptr, err, long int, nr, args) + #undef INLINE_SYSCALL /* This version is for kernels that implement system calls that @@ -201,6 +148,7 @@ register long int r7 __asm__ ("r7"); \ register long int r8 __asm__ ("r8"); \ LOADARGS_##nr (name, ##args); \ + ABORT_TRANSACTION; \ __asm__ __volatile__ \ ("sc\n\t" \ "mfcr %0\n\t" \ @@ -282,7 +230,7 @@ /* Pointer mangling support. */ -#if defined NOT_IN_libc && defined IS_IN_rtld +#if IS_IN (rtld) /* We cannot use the thread descriptor because in ld.so we use setjmp earlier than the descriptor is initialized. */ #else diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c new file mode 100644 index 0000000000..d307135003 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/x86_64/timer_create.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c new file mode 100644 index 0000000000..2dd94f5c7a --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/x86_64/timer_delete.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c new file mode 100644 index 0000000000..22eaff5cda --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c new file mode 100644 index 0000000000..cea524bae5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/x86_64/timer_gettime.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c new file mode 100644 index 0000000000..fa231149d5 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c @@ -0,0 +1 @@ +#include <sysdeps/unix/sysv/linux/x86_64/timer_settime.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S index ebffc4c5af..8237cb4009 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2014 Free Software Foundation, Inc. +/* Copyright (C) 2003-2015 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 @@ -18,7 +18,7 @@ #include <sysdep.h> #define _ERRNO_H 1 #include <bits/errno.h> -#include <kernel-features.h> +#include <tcb-offsets.h> /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is @@ -27,9 +27,36 @@ ENTRY (__vfork) CALL_MCOUNT 0 + + /* Load the TCB-cached PID value and negates it. If It it is zero + sets it to 0x800000. And then sets its value again on TCB field. + See raise.c for the logic that relies on this value. */ + lwz r0,PID(r13) + cmpwi cr0,r0,0 + neg r0,r0 + bne- cr0,1f + lis r0,0x8000 +1: stw r0,PID(r13) + DO_CALL (SYS_ify (vfork)) + + cmpwi cr1,r3,0 + beqlr- 1 + + /* Restore the original value of the TCB cache of the PID, if we're + the parent. But in the child (syscall return value equals zero), + leave things as they are. */ + lwz r0,PID(r13) + clrlwi r4,r0,1 + cmpwi cr1,r4,0 + beq- cr1,1f + neg r4,r0 +1: stw r4,PID(r13) + PSEUDO_RET + PSEUDO_END (__vfork) libc_hidden_def (__vfork) weak_alias (__vfork, vfork) +strong_alias (__vfork, __libc_vfork) diff --git a/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c b/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c new file mode 100644 index 0000000000..78f20d7c88 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c @@ -0,0 +1,61 @@ +/* Copyright (C) 2002-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <setjmp.h> +#include <stdlib.h> +#include <bits/wordsize.h> +#include "pthreadP.h" +#include <shlib-compat.h> +#if defined SHARED && SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_3_4) + +/* These functions are not declared anywhere since they shouldn't be + used at another place but here. */ +extern void __novmx__libc_siglongjmp (sigjmp_buf env, int val) + __attribute__ ((noreturn)); +extern void __novmx__libc_longjmp (sigjmp_buf env, int val) + __attribute__ ((noreturn)); + + +void __novmx_siglongjmp (sigjmp_buf env, int val) +{ + __novmx__libc_siglongjmp (env, val); +} + +void __novmx_longjmp (jmp_buf env, int val) +{ + __novmx__libc_longjmp (env, val); +} + +compat_symbol (libpthread, __novmx_longjmp, longjmp, GLIBC_2_0); +compat_symbol (libpthread, __novmx_siglongjmp, siglongjmp, GLIBC_2_0); +#endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)) */ + +void +__vmx_longjmp (jmp_buf env, int val) +{ + __libc_longjmp (env, val); +} + +void +__vmx_siglongjmp (jmp_buf env, int val) +{ + __libc_siglongjmp (env, val); +} + +versioned_symbol (libpthread, __vmx_longjmp, longjmp, GLIBC_2_3_4); +versioned_symbol (libpthread, __vmx_siglongjmp, siglongjmp, GLIBC_2_3_4); diff --git a/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c b/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c new file mode 100644 index 0000000000..2cb0a13bcb --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c @@ -0,0 +1,2 @@ +#define NEW_VERNUM GLIBC_2_6 +#include <nptl/pthread_attr_setstack.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c b/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c new file mode 100644 index 0000000000..6fedac1b33 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c @@ -0,0 +1,9 @@ +#include <unistd.h> /* For __getpagesize. */ +#define NEW_VERNUM GLIBC_2_6 +#define STACKSIZE_ADJUST \ + do { \ + size_t ps = __getpagesize (); \ + if (stacksize < 2 * ps) \ + stacksize = 2 * ps; \ + } while (0) +#include <nptl/pthread_attr_setstacksize.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_cond_lock.c index 7d7897ed77..ea8f86aa4a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sched_getcpu.c +++ b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_cond_lock.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2013-2014 Free Software Foundation, Inc. +/* Copyright (C) 2015 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 @@ -15,16 +15,8 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <sched.h> -#include <sysdep.h> -#include <bits/libc-vdso.h> +/* The cond lock is not actually elided yet, but we still need to handle + already elided locks. */ +#include <elision-conf.h> - -int -sched_getcpu (void) -{ - unsigned int cpu; - int r = INLINE_VSYSCALL (getcpu, 3, &cpu, NULL, NULL); - - return r == -1 ? r : cpu; -} +#include <nptl/pthread_mutex_cond_lock.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_lock.c b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_lock.c new file mode 100644 index 0000000000..99a1d3c58a --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_lock.c @@ -0,0 +1,22 @@ +/* Elided version of pthread_mutex_lock. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <elision-conf.h> +#include <force-elision.h> + +#include <nptl/pthread_mutex_lock.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_timedlock.c b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_timedlock.c new file mode 100644 index 0000000000..6eed463b63 --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_timedlock.c @@ -0,0 +1,22 @@ +/* Elided version of pthread_mutex_timedlock. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <elision-conf.h> +#include <force-elision.h> + +#include <nptl/pthread_mutex_timedlock.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_trylock.c b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_trylock.c new file mode 100644 index 0000000000..ed3a87cf3e --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/pthread_mutex_trylock.c @@ -0,0 +1,22 @@ +/* Elided version of pthread_mutex_trylock. + Copyright (C) 2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include <elision-conf.h> +#include <force-elision.h> + +#include <nptl/pthread_mutex_trylock.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c b/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c new file mode 100644 index 0000000000..7af694f4ab --- /dev/null +++ b/sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c @@ -0,0 +1,28 @@ +/* pthread_spin_unlock -- unlock a spin lock. PowerPC version. + Copyright (C) 2007-2015 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + <http://www.gnu.org/licenses/>. */ + +#include "pthreadP.h" +#include <lowlevellock.h> + +int +pthread_spin_unlock (pthread_spinlock_t *lock) +{ + __asm __volatile (__ARCH_REL_INSTR ::: "memory"); + *lock = 0; + return 0; +} diff --git a/sysdeps/unix/sysv/linux/powerpc/readelflib.c b/sysdeps/unix/sysv/linux/powerpc/readelflib.c index 3e96332b4d..49aab6bd9f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/readelflib.c +++ b/sysdeps/unix/sysv/linux/powerpc/readelflib.c @@ -1,5 +1,5 @@ /* Special checks on libraries for ldconfig. Linux/PowerPC version. - Copyright (C) 2002-2014 Free Software Foundation, Inc. + Copyright (C) 2002-2015 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/sysdeps/unix/sysv/linux/powerpc/setrlimit.c b/sysdeps/unix/sysv/linux/powerpc/setrlimit.c deleted file mode 100644 index bfaef74c38..0000000000 --- a/sysdeps/unix/sysv/linux/powerpc/setrlimit.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/unix/sysv/linux/i386/setrlimit.c> diff --git a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h index 3aeac1f943..31f255eafc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h +++ b/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 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/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h b/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h index e6bba78709..367fd2b610 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/procfs.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2014 Free Software Foundation, Inc. +/* Copyright (C) 1996-2015 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/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h index dd81efc281..4b768baab8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h @@ -1,5 +1,5 @@ /* `ptrace' debugger support interface. Linux version. - Copyright (C) 2001-2014 Free Software Foundation, Inc. + Copyright (C) 2001-2015 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/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h index 3b3151ed89..fada638dd8 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 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/sysdeps/unix/sysv/linux/powerpc/sys/user.h b/sysdeps/unix/sysv/linux/powerpc/sys/user.h index 8c6d905752..995b663da6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/user.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/user.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2014 Free Software Foundation, Inc. +/* Copyright (C) 1998-2015 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/sysdeps/unix/sysv/linux/powerpc/syscall.S b/sysdeps/unix/sysv/linux/powerpc/syscall.S index 346e962240..157e3e3296 100644 --- a/sysdeps/unix/sysv/linux/powerpc/syscall.S +++ b/sysdeps/unix/sysv/linux/powerpc/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2014 Free Software Foundation, Inc. +/* Copyright (C) 1991-2015 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/sysdeps/unix/sysv/linux/powerpc/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/syscalls.list index a6665936e8..4f821e9b01 100644 --- a/sysdeps/unix/sysv/linux/powerpc/syscalls.list +++ b/sysdeps/unix/sysv/linux/powerpc/syscalls.list @@ -1,3 +1,3 @@ # File name Caller Syscall name # args Strong name Weak names -waitpid - waitpid Ci:ipi __waitpid waitpid __libc_waitpid +waitpid - waitpid Ci:ipi __waitpid waitpid diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.c b/sysdeps/unix/sysv/linux/powerpc/sysdep.c index 0c11d2b4de..6dc673735b 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sysdep.c +++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2014 Free Software Foundation, Inc. +/* Copyright (C) 1997-2015 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/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c index af765bc635..e1b305ac9a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c +++ b/sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c @@ -1,5 +1,5 @@ /* Check __ppc_get_timebase_freq() for architecture changes - Copyright (C) 2012-2014 Free Software Foundation, Inc. + Copyright (C) 2012-2015 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 @@ -41,7 +41,7 @@ do_test (void) printf ("Time Base frequency = %"PRIu64" Hz\n", f); if (f == 0) { - printf ("Fail: The time base frequency can't be zero."); + printf ("Fail: The time base frequency can't be zero.\n"); return 1; } diff --git a/sysdeps/unix/sysv/linux/powerpc/time.c b/sysdeps/unix/sysv/linux/powerpc/time.c index 9f54d97246..0c26508f43 100644 --- a/sysdeps/unix/sysv/linux/powerpc/time.c +++ b/sysdeps/unix/sysv/linux/powerpc/time.c @@ -1,5 +1,5 @@ /* time system call for Linux/PowerPC. - Copyright (C) 2013-2014 Free Software Foundation, Inc. + Copyright (C) 2013-2015 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,7 +21,7 @@ # include <time.h> # include <sysdep.h> # include <dl-vdso.h> -# include <bits/libc-vdso.h> +# include <libc-vdso.h> # include <dl-machine.h> void *time_ifunc (void) asm ("time"); |