aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix
AgeCommit message (Collapse)Author
2013-12-13PowerPC: Adjust multiarch Implies for PowerPC64Adhemerval Zanella
This patch adds Implies files on multiarch folder for POWER chips so multirach is enabled when building with --with-cpu and powerN option.
2013-12-13PowerPC: Adjust multiarch Implies for PowerPC64Adhemerval Zanella
This patch adds Implies files on multiarch folder for POWER chips so multirach is enabled when building with --with-cpu and powerN option.
2013-12-13Use $$ver instead of $ver.Kaz Kojima
2013-12-06PowerPC: Adjust multiarch Implies for PowerPC32Adhemerval Zanella
This patch adds Implies files on multiarch folder for POWER chips so multirach is enabled when building with --with-cpu and powerN option.
2013-12-06PowerPC: change sysdeps fpu folderAdhemerval Zanella
This patch makes the fpu/multiarch folder appears in front of the powerpc/fpu folder.
2013-12-06PowerPC: initial support for multilib for PowerPC32Adhemerval Zanella
This patch add a empty Makefile, the C IFUNC helper macros, and a empty available IFUNC implementation enumeration.
2013-12-06Add SH implementation of sotruss-lib.c and c++-types.data.Kaz Kojima
2013-12-05PowerPC: Add systemtap static probe points in setjmp/longjmpAdhemerval Zanella
This patch add static probes for setjmp/longjmp in the way gdb expects,fixing the gdb.base/longjmp.exp gdb testcases. It changes the symbol_name and use macros to to avoid change the probe names and ending up adding more logic on GDB (since with the expected name GDB work seamlessly).
2013-12-04PowerPC64 ELFv2 ABI 6/6: Bump ld.so soname version numberUlrich Weigand
To avoid having a ELFv2 binary accidentally picking up an old ABI ld.so, this patch bumps the soname to ld64.so.2. In theory (or for testing purposes) this will also allow co-installing ld.so versions for both ABIs on the same system. Note that the kernel will already be able to load executables of both ABIs. However, there is currently no plan to use that theoretical possibility in a any supported distribution environment ... Note that in order to check which ABI to use, we need to invoke the compiler to check the _CALL_ELF macro; this is done in a new configure check in sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac, replacing the hard-coded value of default-abi in the Makefile.
2013-12-04PowerPC64 ELFv2 ABI 4/6: Stack frame layout changesUlrich Weigand
This updates glibc for the changes in the ELFv2 relating to the stack frame layout. These are described in more detail here: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01149.html http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01146.html Specifically, the "compiler and linker doublewords" were removed, which has the effect that the save slot for the TOC register is now at offset 24 rather than 40 to the stack pointer. In addition, a function may now no longer necessarily assume that its caller has set up a 64-byte register save area its use. To address the first change, the patch goes through all assembler files and replaces immediate offsets in instructions accessing the ABI-defined stack slots by symbolic offsets. Those already were defined in ucontext_i.sym and used in some of the context routines, but that doesn't really seem like the right place for those defines. The patch instead defines those symbolic offsets in sysdeps.h, in two variants for the old and new ABI, and uses them systematically in all assembler files, not just the context routines. The second change only affected a few assembler files that used the save area to temporarily store some registers. In those cases where this happens within a leaf function, this patch changes the code to store those registers to the "red zone" below the stack pointer. Otherwise, the functions already allocate a stack frame, and the patch changes them to add extra space in these frames as temporary space for the ELFv2 ABI.
2013-12-04PowerPC64 ELFv2 ABI 2/6: Remove function descriptorsUlrich Weigand
This patch adds support for the ELFv2 ABI feature to remove function descriptors. See this GCC patch for in-depth discussion: http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01141.html This mostly involves two types of changes: updating assembler source files to the new logic, and updating the dynamic loader. After the refactoring in the previous patch, most of the assembler source changes can be handled simply by providing ELFv2 versions of the macros in sysdep.h. One somewhat non-obvious change is in __GI__setjmp: this used to "fall through" to the immediately following __setjmp ENTRY point. This is no longer safe in the ELFv2 since ENTRY defines both a global and a local entry point, and you cannot simply fall through to a global entry point as it requires r12 to be set up. Also, makecontext needs to be updated to set up registers according to the new ABI for calling into the context's start routine. The dynamic linker changes mostly consist of removing special code to handle function descriptors. We also need to support the new PLT and glink format used by the the ELFv2 linker, see: https://sourceware.org/ml/binutils/2013-10/msg00376.html In addition, the dynamic linker now verifies that the dynamic libraries it loads match its own ABI. The hack in VDSO_IFUNC_RET to "synthesize" a function descriptor for vDSO routines is also no longer necessary for ELFv2.
2013-12-04PowerPC64 ELFv2 ABI 1/6: Code refactoringUlrich Weigand
This is the first patch to support the new ELFv2 ABI in glibc. As preparation, this patch simply refactors some of the powerpc64 assembler code to move all code related to creating function descriptors (.opd section) or using function descriptors (function pointer call) into a central place in sysdep.h. Note that most locations creating .opd entries were already using macros in sysdep.h, this patch simply extends this to the remaining places. No relevant change in generated code expected.
2013-12-04PowerPC64: Fix incorrect CFI in *context routinesUlrich Weigand
The context established by "makecontext" has a link register pointing back to an error path within the makecontext routine. This is currently covered by the CFI FDE for makecontext itself, which is simply wrong for the stack frame *inside* the context. When trying to unwind (e.g. doing a backtrace) in a routine inside a context created by makecontext, this can lead to uninitialized stack slots being accessed, causing the unwinder to crash in the worst case. Similarly, during parts of the "setcontext" routine, when the stack pointer has already been switched to point to the new context, the address range is still covered by the CFI FDE for setcontext. When trying to unwind in that situation (e.g. backtrace from an async signal handler for profiling), it is again possible that the unwinder crashes. Theses are all problems in existing code, but the changes in stack frame layout appear to make the "worst case" much more likely in the ELFv2 ABI context. This causes regressions e.g. in the libgo testsuite on ELFv2. This patch fixes this by ending the makecontext/setcontext FDEs before those problematic parts of the assembler, similar to what is already done on other platforms. This fixes the libgo regression on ELFv2.
2013-12-03Properly handle shm_open validation. Fixes bug 16274.Ondřej Bílka
2013-11-28Add powerpc-nofpu/e500 support functions for atomic compound assignment and ↵Joseph Myers
FLT_ROUNDS.
2013-11-26PowerPC: Fix __fe_nomask_env missing symbolAdhemerval Zanella
This patch fix the missing symbol __fe_nomask_env from commit 41e8926aa4b7f17bc95984737ee82a254ad0911c for GLIBC_2.1.
2013-11-26Use __glibc_reserved instead __unused.Ondřej Bílka
2013-11-25Fix typo in sys/ptrace.h.Carlos O'Donell
The event code is PTRACE_EVENT_SECCOMP, not PTRAVE_EVENT_SECCOMP. This patch fixes the V->C typo. There are no ABI issues since the number remains the same for the code. Code using the old wrong name will need to be updated.
2013-11-13PowerPC: Fix __fe_mask_env exportAdhemerval Zanella
Change SHLIB_COMPAT calls to GLIBC_2_19 for __fe_nomask_env symbol.
2013-11-13Set arch_minimum_kernel to 3.4.0 for x32H.J. Lu
x32 ABI support was added in Linux kernel 3.4.0.
2013-11-13PowerPC: Fix __fe_mask_env exportAdhemerval Zanella
This patch does not export __fe_mask_env anymore, only providing a compatibility symbol. It fixes BZ#14143.
2013-11-08PowerPC: Fix vDSO missing ODP entriesAdhemerval Zanella
This patch fixes the vDSO symbol used directed in IFUNC resolver where they do not have an associated ODP entry leading to undefined behavior in some cases. It adds an artificial OPD static entry to such cases and set its TOC to non 0 to avoid triggering lazy resolutions.
2013-10-31Restrict shm_open and shm_unlink to SHMDIR. Fixes bugs 14752 and 15763.Ondřej Bílka
2013-10-30rename configure.in to configure.acMike Frysinger
Autoconf has been deprecating configure.in for quite a long time. Rename all our configure.in and preconfigure.in files to .ac. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-10-18Add e500 port.Joseph Myers
2013-10-04Move powerpc ports pieces to libc.Joseph Myers
2013-10-04e500 port: adjust sysdeps/unix/sysv/linux/configure.in case.Joseph Myers
2013-10-04e500 port: getcontext / setcontext / swapcontext.Joseph Myers
2013-10-04PowerPC SIGSTKSZAlan Modra
http://sourceware.org/ml/libc-alpha/2013-08/msg00093.html This copies the sparc version of sigstack.h, which gives powerpc #define MINSIGSTKSZ 4096 #define SIGSTKSZ 16384 Before the VSX changes, struct rt_sigframe size was 1920 plus 128 for __SIGNAL_FRAMESIZE giving ppc64 exactly the default MINSIGSTKSZ of 2048. After VSX, ucontext increased by 256 bytes. Oops, we're over MINSIGSTKSZ, so powerpc has been using the wrong value for quite a while. Add another ucontext for TM and rt_sigframe is now at 3872, giving actual MINSIGSTKSZ of 4000. The glibc testcase that I was looking at was tst-cancel21, which allocates 2*SIGSTKSZ (not because the test is trying to be conservative, but because the test actually has nested signal stack frames). We blew the allocation by 48 bytes when using current mainline gcc to compile glibc (le ppc64). The required stack depth in _dl_lookup_symbol_x from the top of the next signal frame was 10944 bytes. I guess you'd want to add 288 to that, implying an actual SIGSTKSZ of 11232. * sysdeps/unix/sysv/linux/powerpc/bits/sigstack.h: New file.
2013-10-04PowerPC makecontextAlan Modra
http://sourceware.org/ml/libc-alpha/2013-08/msg00092.html Use conditional form of branch and link to avoid destroying the cpu link stack used to predict blr return addresses. * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S: Use conditional form of branch and link when obtaining pc. * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise.
2013-10-04PowerPC LE _dl_hwcap accessAlan Modra
http://sourceware.org/ml/libc-alpha/2013-08/msg00091.html More LE support, correcting word accesses to _dl_hwcap. * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: Use HIWORD/LOWORD. * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: Ditto. * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: Ditto.
2013-09-28tst-fanotify: fix styleMike Frysinger
Reported-by: Andreas Jaeger <aj@suse.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-28don't use Bash-specific ${parameter/pattern/string} expansionPatrick 'P. J.' McDermott
sysdeps/unix/make-syscalls.sh and sysdeps/unix/Makefile use GNU Bash's ${parameter/pattern/string} parameter expansion. Non-Bash shells (e.g. dash or BusyBox ash when built with CONFIG_ASH_BASH_COMPAT disabled) don't support this expansion syntax. So glibc will fail to build when $(SHELL) expands to a path that isn't provided by Bash. An example build failure: for dir in [...]; do \ test -f $dir/syscalls.list && \ { sysdirs='[...]' \ asm_CPP='gcc -c -I[...] -D_LIBC_REENTRANT -include include/libc-symbols.h -DASSEMBLER -g -Wa,--noexecstack -E -x assembler-with-cpp' \ /bin/sh sysdeps/unix/make-syscalls.sh $dir || exit 1; }; \ test $dir = sysdeps/unix && break; \ done > [build-dir]/sysd-syscallsT sysdeps/unix/make-syscalls.sh: line 273: syntax error: bad substitution This patch simply replaces the three instances of the Bash-only syntax in these files with an echo and sed command substitution. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-11Add O_TMPFILE to <fcntl.h>Andreas Schwab
2013-09-06Coordinate IPv6 definitions for Linux and glibcCarlos O'Donell
This change synchronizes the glibc headers with the Linux kernel headers and arranges to coordinate the definition of structures already defined the Linux kernel UAPI headers. It is now safe to include glibc's netinet/in.h or Linux's linux/in6.h in any order in a userspace application and you will get the same ABI. The ABI is guaranteed by UAPI and glibc.
2013-09-05tst-fanotify: skip when we get back EPERMMike Frysinger
Since fanotify_init requires CAP_SYS_ADMIN in order to work (which usually means running as root), we need to handle that error case too. Reported-by: Andreas Jaeger <aj@suse.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-02tst-fanotify: new simple testMike Frysinger
Basic test for the fanotify functions. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-08-30Fix typos.Ondřej Bílka
2013-08-29Remove aix specific files.Ondřej Bílka
2013-08-29Support ELFOSABI_GNU on all GNU systems.Thomas Schwinge
2013-08-29Use ELFOSABI_GNU instead of ELFOSABI_LINUX.Thomas Schwinge
2013-08-29Fix typos.Ondřej Bílka
2013-08-27True stub __ifreq.Roland McGrath
2013-08-27Clean up __libc_sa_len helper.Roland McGrath
2013-08-27Replace generic bits/socket.h with 4.4 file.Roland McGrath
2013-08-27Flesh out 4.4 bits/socket.h with SOCK_CLOEXEC, SOCK_NONBLOCK.Roland McGrath
2013-08-21Fix typos.Ondřej Bílka
2013-08-20PowerPC: fix backtrace to handle signal trampolinesAdhemerval Zanella
This patch fixes backtrace for PPC32 and PPC64 to correctly handle signal trampolines. The 'debug/tst-backtrace6.c' also check for SA_SIGINFO handling, where is triggers another vDSO symbols for PPC32.
2013-08-20Include <string.h> in sysdeps/unix/sysv/linux/mmap64.c.Joseph Myers
2013-08-20Use __getpagesize and __ffs in MMAP2_PAGE_SHIFT == -1 case of mmap64.Joseph Myers