summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux
Commit message (Collapse)AuthorAgeFilesLines
...
* bfin: pull in common/sysdep.hMike Frysinger2010-07-261-1/+1
| | | | | | Fixes random build errors in linux/common/. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* msync: skip if syscall is missingMike Frysinger2010-07-261-0/+4
| | | | | | | Some arches skip the msync syscall as it is useless (like nommu). So don't require it to build. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nommu: fix building of fork.c when stubs are disabledMike Frysinger2010-07-261-1/+2
| | | | | | | We scrub the fork() prototype for nommu/no stubs, so attempting to get its type isn't going to work. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* bfin: add exec stack markings to assembly filesMike Frysinger2010-07-265-0/+10
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* arm/crt1.S: Avoid dependency on PC+4 or PC+8Khem Raj2010-07-211-8/+3
| | | | | | | * fix a problem with Thumb PIE binaries, where the GOT was located incorrectly because of an offset 8 Signed-off-by: Khem Raj <raj.khem@gmail.com>
* arm: Macros in sysdeps/linux/arm also needed to be changed to accept _a1 to ↵Khem Raj2010-07-151-9/+9
| | | | | | __a1 renaming. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* silence shadow warningsBernhard Reutner-Fischer2010-07-143-48/+48
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* include/param.h: Dont use ARG_MAX from kernel headersKhem Raj2010-07-091-1/+9
| | | | | | | * Use getrlimit for ARG_MAX in sysconf on nptl. * Define NCARGS directly instead of ARG_MAX Signed-off-by: Khem Raj <raj.khem@gmail.com>
* arm: Silence warning about shadow declarationsKhem Raj2010-07-072-26/+26
| | | | | | | | | libc/inet/socketcalls.c: In function ‘__libc_recvfrom’: libc/inet/socketcalls.c:229:1: warning: declaration of ‘_sys_result’ shadows a previous local libc/inet/socketcalls.c:229:1: warning: shadowed declaration is here Signed-off-by: Khem Raj <raj.khem@gmail.com>
* nptl: fix buildsysBernhard Reutner-Fischer2010-07-063-7/+7
| | | | | | | | | Now automatically picks the correct (arch and subarch specific) impls in favour of generic impls. make O=/tmp/objs PREFIX=/my/sysroot -j works now as expected (both out-of-tree as well as parallel-safe). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "don't make __errno_location / __h_errno_location hidden"Austin Foxley2010-07-062-0/+4
| | | | | | | | This reverts commit 0d6ee549bc86fd330672a79d9a87d2c3825eea67. We need to find a solution that will work in shared and static libraries Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* don't make __errno_location / __h_errno_location hiddenPeter Korsgaard2010-07-052-4/+0
| | | | | | | | | | | | | Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) __errno_location / __h_errno_location access has to go through the PLT like malloc/free, so the linuxthread variants gets used instead when compiling with -pthread. Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* remove extra comma in lock macroAustin Foxley2010-07-031-1/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* mips/syscall-error: Choose the correct version for setting up errno.Khem Raj2010-06-302-5/+8
| | | | | | | | | | | * Current function is a C protype and PSEUDO macro does not transfer syscall return parameters to correct argument registers for a C function. This causes problem with syscalls setting wrong value for errno when they encounter an error. * Fixes PR/2089 for mips/nptl Signed-off-by: Khem Raj <raj.khem@gmail.com>
* remove redundant args to do_lnBernhard Reutner-Fischer2010-06-291-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* use uniform form of C99 keywordsBernhard Reutner-Fischer2010-06-248-29/+29
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* libc: silence warnings about undefined cpp tokensBernhard Reutner-Fischer2010-06-244-5/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* MIPS: Fix build error with linuxthreads.oldAbdoulaye Walsimou Gaye2010-06-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoid the following build error: AS libc/sysdeps/linux/mips/vfork.os In file included from libc/sysdeps/linux/mips/vfork.S:22: ./libc/sysdeps/linux/mips/sysdep.h:41:20: error: regdef.h: No such file or directory libc/sysdeps/linux/mips/vfork.S: Assembler messages: libc/sysdeps/linux/mips/vfork.S:40: Warning: Unrecognized register name `sp' libc/sysdeps/linux/mips/vfork.S:40: Warning: Bad .frame directive libc/sysdeps/linux/mips/vfork.S:40: Error: junk at end of line, first unrecognized character is `s' libc/sysdeps/linux/mips/vfork.S:44: Error: illegal operands `dsubu sp,FRAMESZ' libc/sysdeps/linux/mips/vfork.S:45: Error: bad or irreducible absolute expression libc/sysdeps/linux/mips/vfork.S:65: Error: illegal operands `daddu sp,FRAMESZ' libc/sysdeps/linux/mips/vfork.S:69: Error: illegal operands `li a0,0x4112' libc/sysdeps/linux/mips/vfork.S:70: Error: illegal operands `move a1,sp' libc/sysdeps/linux/mips/vfork.S:73: Error: illegal operands `li v0,(5000+55)' libc/sysdeps/linux/mips/vfork.S:78: Error: illegal operands `bnez a3,.Lerror' libc/sysdeps/linux/mips/vfork.S:88: Error: illegal operands `dla t9,__syscall_error' libc/sysdeps/linux/mips/vfork.S:90: Error: illegal operands `jr t9' Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc: define cfi_personality and cfi_lsdaBernhard Reutner-Fischer2010-06-171-0/+11
| | | | | | required for proper, current subarch handling Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* silence some warnings about missing prototypesBernhard Reutner-Fischer2010-06-114-3/+5
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* mips/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK definitions for mipsKhem Raj2010-06-071-7/+21
| | | | | | * __ss_aligntype is defined to unsigned long int Signed-off-by: Khem Raj <raj.khem@gmail.com>
* inotify: add inotify_init1 system call supportVladimir Zapolskiy2010-06-012-0/+17
| | | | | | | | This patch introduces support for inotify_init1 system call, found since Linux 2.6.27. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* bits/socket.h: add SOCK_CLOEXEC and SOCK_NONBLOCK supportVladimir Zapolskiy2010-06-011-1/+11
| | | | | | | | This patch adds support for SOCK_CLOEXEC and SOCK_NONBLOCK socket descriptor flags, which are introduced since Linux 2.6.27 Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
* mips: Add vfork to libcKhem Raj2010-05-192-3/+8
| | | | | | | | | * When using NPTL get clone.o from nptl. * Only use vfork if syscall is there. * Add libc_a_SSRC to LINUX_LIBC_ARCH_OBJ. * Use CLEAN_* for clean target. Signed-off-by: Khem Raj <raj.khem@gmail.com>
* powerpc: Add TLS and NPTL supportKhem Raj2010-05-0912-336/+724
| | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* fix a few build errors for the no threads caseAustin Foxley2010-04-281-0/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* MIPS: restore INLINE_SYSCALL macroGabor Juhos2010-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MIPS specific INLINE_SYSCALL macro has been renamed to INLINE_SYSCALL_NCS with: 763bbf9e9a27426c9be8322dca5ddf2cb4dbc464 syscall: unify part 2: NCS variety Declare common NCS (non-constant syscall) variants and convert the existing ports over to this. This change breaks system calls. The code generated with using of the new macro does not obey the restartable syscall convention used by the linux kernel. When it tries to restart the syscall the errno value is not being replaced by the syscall number. This causes weird behaviour of the 'ping' command in busybox for example: root@OpenWrt:/# ping 192.168.1.254 PING 192.168.1.254 (192.168.1.254): 56 data bytes 64 bytes from 192.168.1.254: seq=0 ttl=128 time=6.292 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=1 ttl=128 time=0.719 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=2 ttl=128 time=0.489 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=3 ttl=128 time=0.486 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=4 ttl=128 time=0.487 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=5 ttl=128 time=0.939 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=6 ttl=128 time=0.971 ms ping: recvfrom: Function not implemented 64 bytes from 192.168.1.254: seq=7 ttl=128 time=0.488 ms ping: recvfrom: Funct^C Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: mips needs updated clone() implementationAndreas Schultz2010-04-271-59/+97
| | | | | Signed-off-by: Andreas Schultz <andreas.schultz@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc/x86_64: use ELF-compatible definitions for assemblerRoman I Khimov2010-04-271-17/+1
| | | | | | | | | | | | Fixes open/read/write/close breakage with NPTL on x86_64 (due to missing '.type' declaration). Done this way because there are already ELF-style definitions in assemebler code for x86_64 and looks like HAVE_ELF is not defined and used this days. Or the other way around, it'd be a bit strange for x86_64 not to have ELF. Signed-off-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* enable building __fcntl_nocancel, as it used unconditionally nowAustin Foxley2010-04-251-2/+0
| | | | | | also sync up not-cancel.h headers between all three thread libraries Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix libc internal, dynamically enabled lockingTimo Teräs2010-04-221-12/+5
| | | | | | | | | | | | | | | | | | | | | Final iteration to fix libc internal locking if libpthread is pulled in by dlopen call (directly or indirectly). We cannot really use the weak symbol trick for shared build, since the symbols won't get refreshed if libpthread is pulled in dynamically. In glibc, they have #ifdef SHARED magic to either use pthread_functions table, or weaks. But as we shared object files with both builds, this does not sounds good either. The reintroduces the libc weaks.c, but uses them now only with static build. For dynamic build, we still use the symbols with same name, but provide weaks in forward.c so they end up dereferencing the pthread_functions table indirectly if we are not linked to libpthread. Mutex initialization is hard coded as inline, as it needs to happen even if libpthread is not initially loaded. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: remove unneeded libc-lock.h includeTimo Teräs2010-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | I semi-accidentally added include for libc-lock.h because the intention was to use locking macroes from there. However, we ended up using using the weak alias stuff. This is additionally good since now this can result in compile errors like: In file included from /toolchain/include/bits/uClibc_mutex.h:16, from /toolchain/include/bits/uClibc_stdio.h:107, from /toolchain/include/stdio.h:72, from /work/freetype-2.3.11/include/freetype/config/ftstdlib.h:100, from ./builds/unix/ftconfig.h:43, from builds/unix/ftsystem.c:21: /toolchain/include/bits/libc-lock.h:309: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void' Remove the unneeded include causing breakage. Reported-by: Kevin Day <thekevinday@gmail.com> Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* libc: remove libc weak __pthreads_* wrappersTimo Teras2010-04-162-8/+21
| | | | | | | | | | | | | | | | | It is not possible to override for libpthread to override the weak libc definitions. This has never worked in uclibc, and does no longer work in glibc either (unless you use LD_DYNAMIC_WEAK). The proper thing to do is have weak prototypes in libc, and definitions in libpthread only. This way libc runs even if those functions are not defined, but just needs to protect against the NULL values (done by implementing __uclibc_maybe_call). This fix the problems if libc is linked before libpthread or if libpthread is pulled by a dependency library. Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix libc sigtimedwaitTimo Teräs2010-04-151-2/+3
| | | | | | | | | | | | | | | | | | It seems that 57e8823548ad6e65d33b2153edeb18fb0edc20e6 removed completely sigtimedwait symbol from libc which is wrong. I hope there is not too many other things like this. Apparently the libc_hidden_* macros actually make previously hidden symbols visible globally (creates alias from __GI_* to *). This is probably ancient confusion from times when gcc did not support visibility attribute and hiding symbols was done using hacks like this. This also adds attribute_hidden to the internal __sigtimedwait for nptl case. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* nptl: fix libc sigaction signal checkingTimo Teräs2010-04-152-19/+0
| | | | | | | | | | We should not check for SIGCANCEL in __libc_sigaction because nptl calls this function to setup this signal. Nptl provides it's own override for sigaction that checks that the user cannot override signals nptl uses internally. Linuxthreads does not use SIGCANCEL at all so this affects nptl only. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fixes NPTL build on x86.Natanael Copa2010-04-091-1/+1
| | | | | Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-061-108/+155
|\ | | | | | | | | | | | | | | Conflicts: libc/misc/utmp/utent.c libc/sysdeps/linux/i386/bits/syscalls.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * i386/bits/syscalls.h: more compact, but stack-hungry syscall code. disabled ↵Denys Vlasenko2010-04-061-18/+78
| | | | | | | | | | | | so far Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i386/bits/syscalls.h: explain _BITS_SYSCALLS_ASMDenys Vlasenko2010-04-061-45/+9
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i386/bits/syscalls.h: generate better code using more restrictive asm ↵Denys Vlasenko2010-04-061-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | constraints Example: time() doesn't push/pop two registers now, and is smaller: <__GI_time>: -57 push %edi -8b 7c 24 08 mov 0x8(%esp),%edi -53 push %ebx -89 fb mov %edi,%ebx +8b 4c 24 04 mov 0x4(%esp),%ecx +87 cb xchg %ecx,%ebx b8 0d 00 00 00 mov $0xd,%eax cd 80 int $0x80 -5b pop %ebx -5f pop %edi +87 cb xchg %ecx,%ebx c3 ret Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i386/bits/syscalls.h: explain how it works. no code changesDenys Vlasenko2010-04-061-100/+116
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | poll.c: fix incorrect mergeAustin Foxley2010-04-021-3/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-04-029-286/+201
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prettify make cleanBernhard Reutner-Fischer2010-03-252-6/+6
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * nios2: Define INTERNAL_SYSCALL_NCS, use common sycall definesTobias Klauser2010-03-181-274/+85
| | | | | | | | | | | | | | | | | | | | Define the nios2 version of INTERNAL_SYSCALL_NCS and remove all sycall defines already defined by the common syscall defines. This will make the master branch of uClibc compile again for nios2. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * nios2: Update fcntl.h from m68kTobias Klauser2010-03-181-2/+4
| | | | | | | | | | Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * nios2: Add sys/user.hTobias Klauser2010-03-161-0/+93
| | | | | | | | | | | | | | | | | | | | | | This is a fixed version containing copyright information. The patch should now apply using 'git am'. linux/user.h is no longer exported during kernel make headers_install Signed-off-by: Atle Nissestad <atle@nissestad.no> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * pull kernel-features.h from NPTLBernhard Reutner-Fischer2010-03-051-18/+392
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * poll: unavailable on linux < 2.2.0Bernhard Reutner-Fischer2010-03-042-1/+7
| | | | | | | | | | | | fixes bug #253 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * libc_sh: Add a sysdep header for shCarmelo Amoroso2010-02-101-0/+277
| | | | | | | | | | | | | | | | | | | | | | | | A new sysdep header for sh (ported from NPTL branch) to provide some useful macros in asm code: ENTRY: an entry point visible from C PSEUDO: a wrapper for syscall with proper errno checking SYSCALL_ERROR_HANDLER: errno check (suitable for TLS) This will help in NPTL integration. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>