summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc/bits
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/bits')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/environments.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/ipc.h6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h39
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/mman.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/msq.h12
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/ppc.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/sem.h10
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/shm.h22
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h54
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/stat.h22
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/termios.h2
12 files changed, 128 insertions, 47 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/environments.h b/sysdeps/unix/sysv/linux/powerpc/bits/environments.h
index 0fe1e3f5fd..475ce8b4dc 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-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h b/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
index 6eb77991dd..2523ed15b2 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-2013 Free Software Foundation, Inc.
+ Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h b/sysdeps/unix/sysv/linux/powerpc/bits/ipc.h
index f2bb635a54..c9c2e2a06b 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-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -49,8 +49,8 @@ struct ipc_perm
__mode_t mode; /* Read/write permission. */
__uint32_t __seq; /* Sequence number. */
__uint32_t __pad1;
- __uint64_t __unused1;
- __uint64_t __unused2;
+ __uint64_t __glibc_reserved1;
+ __uint64_t __glibc_reserved2;
};
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
index 8b195db1bf..e90829db27 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/libc-vdso.h
@@ -1,5 +1,5 @@
/* Resolve function pointers to VDSO functions.
- Copyright (C) 2005-2013 Free Software Foundation, Inc.
+ Copyright (C) 2005-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,12 +34,39 @@ extern void *__vdso_getcpu;
extern void *__vdso_time;
-/* This macro is needed for PPC64 to return a skeleton OPD entry of a vDSO
- symbol. This works because _dl_vdso_vsym always return the function
- address, and no vDSO symbols use the TOC or chain pointers from the OPD
- so we can allow them to be garbage. */
#if defined(__PPC64__) || defined(__powerpc64__)
-#define VDSO_IFUNC_RET(value) ((void *) &(value))
+extern void *__vdso_sigtramp_rt64;
+#else
+extern void *__vdso_sigtramp32;
+extern void *__vdso_sigtramp_rt32;
+#endif
+
+#if (defined(__PPC64__) || defined(__powerpc64__)) && _CALL_ELF != 2
+/* The correct solution is for _dl_vdso_vsym to return the address of the OPD
+ for the kernel VDSO function. That address would then be stored in the
+ __vdso_* variables and returned as the result of the IFUNC resolver function.
+ Yet, the kernel does not contain any OPD entries for the VDSO functions
+ (incomplete implementation). However, PLT relocations for IFUNCs still expect
+ the address of an OPD to be returned from the IFUNC resolver function (since
+ PLT entries on PPC64 are just copies of OPDs). The solution for now is to
+ create an artificial static OPD for each VDSO function returned by a resolver
+ function. The TOC value is set to a non-zero value to avoid triggering lazy
+ symbol resolution via .glink0/.plt0 for a zero TOC (requires thread-safe PLT
+ sequences) when the dynamic linker isn't prepared for it e.g. RTLD_NOW. None
+ of the kernel VDSO routines use the TOC or AUX values so any non-zero value
+ will work. Note that function pointer comparisons will not use this artificial
+ static OPD since those are resolved via ADDR64 relocations and will point at
+ the non-IFUNC default OPD for the symbol. Lastly, because the IFUNC relocations
+ are processed immediately at startup the resolver functions and this code need
+ not be thread-safe, but if the caller writes to a PLT slot it must do so in a
+ thread-safe manner with all the required barriers. */
+#define VDSO_IFUNC_RET(value) \
+ ({ \
+ static Elf64_FuncDesc vdso_opd = { .fd_toc = ~0x0 }; \
+ vdso_opd.fd_func = (Elf64_Addr)value; \
+ &vdso_opd; \
+ })
+
#else
#define VDSO_IFUNC_RET(value) ((void *) (value))
#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
index 3f72c03351..a2a0fafee7 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-2013 Free Software Foundation, Inc.
+ Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/msq.h b/sysdeps/unix/sysv/linux/powerpc/bits/msq.h
index 59147c268c..da686c85dc 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-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,15 +39,15 @@ struct msqid_ds
{
struct ipc_perm msg_perm; /* structure describing operation permission */
#if __WORDSIZE == 32
- unsigned int __unused1;
+ unsigned int __glibc_reserved1;
#endif
__time_t msg_stime; /* time of last msgsnd command */
#if __WORDSIZE == 32
- unsigned int __unused2;
+ unsigned int __glibc_reserved2;
#endif
__time_t msg_rtime; /* time of last msgrcv command */
#if __WORDSIZE == 32
- unsigned int __unused3;
+ unsigned int __glibc_reserved3;
#endif
__time_t msg_ctime; /* time of last change */
unsigned long __msg_cbytes; /* current number of bytes on queue */
@@ -55,8 +55,8 @@ struct msqid_ds
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
__pid_t msg_lspid; /* pid of last msgsnd() */
__pid_t msg_lrpid; /* pid of last msgrcv() */
- unsigned long __unused4;
- unsigned long __unused5;
+ unsigned long __glibc_reserved4;
+ unsigned long __glibc_reserved5;
};
#ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h b/sysdeps/unix/sysv/linux/powerpc/bits/ppc.h
index c562021d37..e9e8a9b2cf 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-2013 Free Software Foundation, Inc.
+ Copyright (C) 2012-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/sem.h b/sysdeps/unix/sysv/linux/powerpc/bits/sem.h
index 3847a3377e..783135dc25 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-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,16 +39,16 @@ struct semid_ds
{
struct ipc_perm sem_perm; /* operation permission struct */
#if __WORDSIZE == 32
- unsigned int __unused1;
+ unsigned int __glibc_reserved1;
#endif
__time_t sem_otime; /* last semop() time */
#if __WORDSIZE == 32
- unsigned int __unused2;
+ unsigned int __glibc_reserved2;
#endif
__time_t sem_ctime; /* last time changed by semctl() */
unsigned long int sem_nsems; /* number of semaphores in set */
- unsigned long __unused3;
- unsigned long __unused4;
+ unsigned long __glibc_reserved3;
+ unsigned long __glibc_reserved4;
};
/* The user should define a union like the following to use it for arguments
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
index e43d2fd168..df94d7697d 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-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,26 +50,26 @@ struct shmid_ds
{
struct ipc_perm shm_perm; /* operation permission struct */
#if __WORDSIZE == 32
- unsigned int __unused1;
+ unsigned int __glibc_reserved1;
#endif
__time_t shm_atime; /* time of last shmat() */
#if __WORDSIZE == 32
- unsigned int __unused2;
+ unsigned int __glibc_reserved2;
#endif
__time_t shm_dtime; /* time of last shmdt() */
#if __WORDSIZE == 32
- unsigned int __unused3;
+ unsigned int __glibc_reserved3;
#endif
__time_t shm_ctime; /* time of last change by shmctl() */
#if __WORDSIZE == 32
- unsigned int __unused4;
+ unsigned int __glibc_reserved4;
#endif
size_t shm_segsz; /* size of segment in bytes */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
shmatt_t shm_nattch; /* number of current attaches */
- unsigned long __unused5;
- unsigned long __unused6;
+ unsigned long __glibc_reserved5;
+ unsigned long __glibc_reserved6;
};
#ifdef __USE_MISC
@@ -91,10 +91,10 @@ struct shminfo
unsigned long int shmmni;
unsigned long int shmseg;
unsigned long int shmall;
- unsigned long int __unused1;
- unsigned long int __unused2;
- unsigned long int __unused3;
- unsigned long int __unused4;
+ unsigned long int __glibc_reserved1;
+ unsigned long int __glibc_reserved2;
+ unsigned long int __glibc_reserved3;
+ unsigned long int __glibc_reserved4;
};
struct shm_info
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
new file mode 100644
index 0000000000..92790def19
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h
@@ -0,0 +1,54 @@
+/* sigstack, sigaltstack definitions.
+ 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/>. */
+
+#ifndef _SIGNAL_H
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+
+/* Structure describing a signal stack (obsolete). */
+struct sigstack
+ {
+ void *ss_sp; /* Signal stack pointer. */
+ int ss_onstack; /* Nonzero if executing on this stack. */
+ };
+
+
+/* Possible values for `ss_flags.'. */
+enum
+{
+ SS_ONSTACK = 1,
+#define SS_ONSTACK SS_ONSTACK
+ SS_DISABLE
+#define SS_DISABLE SS_DISABLE
+};
+
+/* Minimum stack size for a signal handler. */
+#define MINSIGSTKSZ 4096
+
+/* System default stack size. */
+#define SIGSTKSZ 16384
+
+
+/* Alternate, preferred interface. */
+typedef struct sigaltstack
+ {
+ void *ss_sp;
+ int ss_flags;
+ size_t ss_size;
+ } stack_t;
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/stat.h b/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
index e5faec0106..1325594e2d 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-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -91,8 +91,8 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
# endif
- unsigned long int __unused4;
- unsigned long int __unused5;
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
};
@@ -131,8 +131,8 @@ struct stat64
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
# endif
- unsigned long int __unused4;
- unsigned long int __unused5;
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
};
# endif /* __USE_LARGEFILE64 */
@@ -185,9 +185,9 @@ struct stat
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
# endif
- unsigned long int __unused4;
- unsigned long int __unused5;
- unsigned long int __unused6;
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+ unsigned long int __glibc_reserved6;
};
# ifdef __USE_LARGEFILE64
@@ -225,9 +225,9 @@ struct stat64
__time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
# endif
- unsigned long int __unused4;
- unsigned long int __unused5;
- unsigned long int __unused6;
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+ unsigned long int __glibc_reserved6;
};
# endif /* __USE_LARGEFILE64 */
#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h
index 4d94a8d72e..d5dbdaa579 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-2013 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or