diff options
Diffstat (limited to 'sysdeps')
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/Makefile | 41 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/____longjmp_chk.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/configure (renamed from sysdeps/unix/sysv/linux/arm/eabi/configure) | 2 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/configure.in (renamed from sysdeps/unix/sysv/linux/arm/eabi/configure.in) | 2 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/eabi/Makefile | 42 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/eabi/syscalls.list | 32 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | 199 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/ftruncate64.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/ftruncate64.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/getcontext.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/getcontext.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/internal_accept4.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/internal_accept4.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/internal_recvmmsg.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/internal_recvmmsg.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/internal_sendmmsg.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/internal_sendmmsg.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/libc-do-syscall.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/libc-do-syscall.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/makecontext.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/makecontext.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/mmap64.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/mmap64.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/msgctl.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/msgctl.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/Makefile (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/Makefile) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/configure (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/configure) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/configure.in (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/configure.in) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/nptl-aeabi_unwind_cpp_pr1.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/nptl-aeabi_unwind_cpp_pr1.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/rt-aeabi_unwind_cpp_pr1.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/rt-aeabi_unwind_cpp_pr1.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/nptl/unwind.h (renamed from sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind.h) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/oldgetrlimit.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/oldgetrlimit.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/oldsetrlimit.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/oldsetrlimit.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/pread.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/pread.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/pread64.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/pread64.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/pwrite.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/pwrite.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/pwrite64.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/pwrite64.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/readahead.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/readahead.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/semctl.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/semctl.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/setcontext.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/setcontext.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/shmctl.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/shmctl.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/sigrestorer.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/socket.S | 126 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/swapcontext.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/swapcontext.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/syscall.S (renamed from sysdeps/unix/sysv/linux/arm/eabi/syscall.S) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/syscalls.list | 35 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/sysdep.h | 208 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/truncate64.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/truncate64.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/arm/umount.c (renamed from sysdeps/unix/sysv/linux/arm/eabi/umount.c) | 0 | ||||
| -rw-r--r-- | sysdeps/unix/sysv/linux/mips/mips32/readahead.c | 2 |
44 files changed, 221 insertions, 468 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile index a9817368a1..fb1e3a5b99 100644 --- a/sysdeps/unix/sysv/linux/arm/Makefile +++ b/sysdeps/unix/sysv/linux/arm/Makefile @@ -1,4 +1,9 @@ ifeq ($(subdir),csu) +# In order for unwinding to fail when it falls out of main, we need a +# cantunwind marker. There's one in start.S. To make sure we reach it, add +# unwind tables for __libc_start_main. +CFLAGS-libc-start.c += -fexceptions + sysdep_routines += aeabi_read_tp libc-aeabi_read_tp static-only-routines += aeabi_read_tp shared-only-routines += libc-aeabi_read_tp @@ -24,3 +29,39 @@ endif ifeq ($(subdir),stdlib) gen-as-const-headers += ucontext_i.sym endif + +# Add a syscall function to each library that needs one. + +ifeq ($(subdir),rt) +librt-sysdep_routines += libc-do-syscall +librt-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),nptl) +libpthread-sysdep_routines += libc-do-syscall +libpthread-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),resolv) +libanl-sysdep_routines += libc-do-syscall +libanl-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),csu) +sysdep_routines += libc-do-syscall +endif + +ifeq ($(subdir),nscd) +nscd-modules += libc-do-syscall +endif + +ifeq ($(subdir),nss) +libnss_db-sysdep_routines += libc-do-syscall +libnss_db-shared-only-routines += libc-do-syscall +endif + +ifeq ($(subdir),posix) +LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o +LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o +LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o +endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S index 8ec41521ca..8ec41521ca 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/____longjmp_chk.S +++ b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure b/sysdeps/unix/sysv/linux/arm/configure index c7e20cfdc5..5b5f4c993a 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure +++ b/sysdeps/unix/sysv/linux/arm/configure @@ -1,5 +1,5 @@ # This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. + # Local configure fragment for sysdeps/unix/sysv/linux/arm. arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/configure.in b/sysdeps/unix/sysv/linux/arm/configure.in index cc0e9b5bd3..b57c4e37b8 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/configure.in +++ b/sysdeps/unix/sysv/linux/arm/configure.in @@ -1,5 +1,5 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/unix/sysv/linux/arm/eabi. +# Local configure fragment for sysdeps/unix/sysv/linux/arm. arch_minimum_kernel=2.6.16 libc_cv_gcc_unwind_find_fde=no diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile deleted file mode 100644 index b7baae9e91..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -ifeq ($(subdir),csu) -# In order for unwinding to fail when it falls out of main, we need a -# cantunwind marker. There's one in start.S. To make sure we reach it, add -# unwind tables for __libc_start_main. -CFLAGS-libc-start.c += -fexceptions -endif - -# Add a syscall function to each library that needs one. - -ifeq ($(subdir),rt) -librt-sysdep_routines += libc-do-syscall -librt-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),nptl) -libpthread-sysdep_routines += libc-do-syscall -libpthread-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),resolv) -libanl-sysdep_routines += libc-do-syscall -libanl-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),csu) -sysdep_routines += libc-do-syscall -endif - -ifeq ($(subdir),nscd) -nscd-modules += libc-do-syscall -endif - -ifeq ($(subdir),nss) -libnss_db-sysdep_routines += libc-do-syscall -libnss_db-shared-only-routines += libc-do-syscall -endif - -ifeq ($(subdir),posix) -LDFLAGS-tst-rfc3484 += $(common-objpfx)csu/libc-do-syscall.o -LDFLAGS-tst-rfc3484-2 += $(common-objpfx)csu/libc-do-syscall.o -LDFLAGS-tst-rfc3484-3 += $(common-objpfx)csu/libc-do-syscall.o -endif diff --git a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list b/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list deleted file mode 100644 index e896902471..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list +++ /dev/null @@ -1,32 +0,0 @@ -# File name Caller Syscall name # args Strong name Weak names - -# Semaphore and shm system calls. msgctl, shmctl, and semctl have C -# wrappers (to set __IPC_64). -msgget - msgget i:ii __msgget msgget -msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv -msgsnd - msgsnd Ci:ibni __msgsnd msgsnd -shmat - shmat i:ipi __shmat shmat -shmdt - shmdt i:s __shmdt shmdt -shmget - shmget i:iii __shmget shmget -semop - semop i:ipi __semop semop -semtimedop - semtimedop i:ipip semtimedop -semget - semget i:iii __semget semget - -# proper socket implementations: -accept - accept Ci:iBN __libc_accept __accept accept -bind - bind i:ipi __bind bind -connect - connect Ci:ipi __libc_connect __connect_internal __connect connect -getpeername - getpeername i:ipp __getpeername getpeername -getsockname - getsockname i:ipp __getsockname getsockname -getsockopt - getsockopt i:iiiBN __getsockopt getsockopt -listen - listen i:ii __listen listen -recv - recv Ci:ibni __libc_recv __recv recv -recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom -recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg -send - send Ci:ibni __libc_send __send send -sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg -sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto -setsockopt - setsockopt i:iiibn __setsockopt setsockopt -shutdown - shutdown i:ii __shutdown shutdown -socket - socket i:iii __socket socket -socketpair - socketpair i:iiif __socketpair socketpair diff --git a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h b/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h deleted file mode 100644 index 408142c1af..0000000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h +++ /dev/null @@ -1,199 +0,0 @@ -/* Copyright (C) 2005, 2006, 2007, 2009 - Free Software Foundation, Inc. - - This file is part of the GNU C Library. - - Contributed by Daniel Jacobowitz <dan@codesourcery.com>, Oct 2005. - - 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 _LINUX_ARM_EABI_SYSDEP_H -#define _LINUX_ARM_EABI_SYSDEP_H 1 - -#include <arm/sysdep.h> - -#include <tls.h> - -#if __NR_SYSCALL_BASE != 0 -# error Kernel headers are too old -#endif - -/* Don't use stime, even if the kernel headers define it. We have - settimeofday, and some EABI kernels have removed stime. Similarly - use setitimer to implement alarm. */ -#undef __NR_stime -#undef __NR_alarm - -/* The ARM EABI user interface passes the syscall number in r7, instead - of in the swi. This is more efficient, because the kernel does not need - to fetch the swi from memory to find out the number; which can be painful - with separate I-cache and D-cache. Make sure to use 0 for the SWI - argument; otherwise the (optional) compatibility code for APCS binaries - may be invoked. */ - -#if defined(__thumb__) -/* We can not expose the use of r7 to the compiler. GCC (as - of 4.5) uses r7 as the hard frame pointer for Thumb - although - for Thumb-2 it isn't obviously a better choice than r11. - And GCC does not support asms that conflict with the frame - pointer. - - This would be easier if syscall numbers never exceeded 255, - but they do. For the moment the LOAD_ARGS_7 is sacrificed. - We can't use push/pop inside the asm because that breaks - unwinding (i.e. thread cancellation) for this frame. We can't - locally save and restore r7, because we do not know if this - function uses r7 or if it is our caller's r7; if it is our caller's, - then unwinding will fail higher up the stack. So we move the - syscall out of line and provide its own unwind information. */ -#undef LOAD_ARGS_7 -#undef INTERNAL_SYSCALL_RAW -#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ - ({ \ - register int _a1 asm ("a1"); \ - int _nametmp = name; \ - LOAD_ARGS_##nr (args) \ - register int _name asm ("ip") = _nametmp; \ - asm volatile ("bl __libc_do_syscall" \ - : "=r" (_a1) \ - : "r" (_name) ASM_ARGS_##nr \ - : "memory", "lr"); \ - _a1; }) -#else /* ARM */ -#undef INTERNAL_SYSCALL_RAW -#define INTERNAL_SYSCALL_RAW(name, err, nr, args...) \ - ({ \ - register int _a1 asm ("r0"), _nr asm ("r7"); \ - LOAD_ARGS_##nr (args) \ - _nr = name; \ - asm volatile ("swi 0x0 @ syscall " #name \ - : "=r" (_a1) \ - : "r" (_nr) ASM_ARGS_##nr \ - : "memory"); \ - _a1; }) -#endif - -/* For EABI, non-constant syscalls are actually pretty easy... */ -#undef INTERNAL_SYSCALL_NCS -#define INTERNAL_SYSCALL_NCS(number, err, nr, args...) \ - INTERNAL_SYSCALL_RAW (number, err, nr, args) - -/* We must save and restore r7 (call-saved) for the syscall number. - We never make function calls from inside here (only potentially - signal handlers), so we do not bother with doubleword alignment. - - Just like the APCS syscall convention, the EABI syscall convention uses - r0 through r6 for up to seven syscall arguments. None are ever passed to - the kernel on the stack, although incoming arguments are on the stack for - syscalls with five or more arguments. - - The assembler will convert the literal pool load to a move for most - syscalls. */ - -#undef DO_CALL -#define DO_CALL(syscall_name, args) \ - DOARGS_##args; \ - ldr r7, =SYS_ify (syscall_name); \ - swi 0x0; \ - UNDOARGS_##args - -#undef DOARGS_0 -#define DOARGS_0 \ - .fnstart; \ - str r7, [sp, #-4]!; \ - cfi_adjust_cfa_offset (4); \ - cfi_rel_offset (r7, 0); \ - .save { r7 } -#undef DOARGS_1 -#define DOARGS_1 DOARGS_0 -#undef DOARGS_2 -#define DOARGS_2 DOARGS_0 -#undef DOARGS_3 -#define DOARGS_3 DOARGS_0 -#undef DOARGS_4 -#define DOARGS_4 DOARGS_0 -#undef DOARGS_5 -#define DOARGS_5 \ - .fnstart; \ - stmfd sp!, {r4, r7}; \ - cfi_adjust_cfa_offset (8); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r7, 4); \ - .save { r4, r7 }; \ - ldr r4, [sp, #8] -#undef DOARGS_6 -#define DOARGS_6 \ - .fnstart; \ - mov ip, sp; \ - stmfd sp!, {r4, r5, r7}; \ - cfi_adjust_cfa_offset (12); \ - cfi_rel_offset (r4, 0); \ - cfi_rel_offset (r5, 4); \ - cfi_rel_offset (r7, 8); \ - .save { r4, r5, r7 |
