OSDN Git Service
Markos Chandras [Thu, 11 Oct 2012 10:08:28 +0000 (11:08 +0100)]
ftruncate: Use ftruncate64 if arch does not have the ftruncate syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 10:01:37 +0000 (11:01 +0100)]
fork: Use clone if arch does not have the fork syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:27:44 +0000 (10:27 +0100)]
vfork: Use clone if arch does not have the vfork syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:51:33 +0000 (10:51 +0100)]
utime: Use utimensat if arch does not have the utime syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:23:19 +0000 (10:23 +0100)]
inotify_init: Use inotify_init1 if inotify_init syscall is not defined
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 31 Oct 2012 16:02:49 +0000 (16:02 +0000)]
epoll: Use epoll_pwait if arch does not have the epoll_wait syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 11 Oct 2012 09:12:24 +0000 (10:12 +0100)]
epoll: Use epoll_create1 if arch does not have the epoll_create syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 15:24:43 +0000 (16:24 +0100)]
pipe: Use pipe2 if arch does not have the pipe syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 15:06:57 +0000 (16:06 +0100)]
utimes: Use utimensat if arch does not have the utimes syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:57:41 +0000 (15:57 +0100)]
symlink: Use symlinkat if arch does not have the symlink syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:50:28 +0000 (15:50 +0100)]
readlink: Use readlinkat if arch does not have the readlink syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:17:10 +0000 (15:17 +0100)]
rename: Use renameat if arch does not have the rename syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:10:27 +0000 (15:10 +0100)]
mkdir: Use mkdirat if arch does not have the mkdir syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:09:53 +0000 (15:09 +0100)]
lchown: Use fchownat if arch does not have the lchown syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 14:05:37 +0000 (15:05 +0100)]
rmdir: Use unlinkat if arch does not have the rmdir syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 13:56:56 +0000 (14:56 +0100)]
chown: Use fchownat if arch does not have the chown syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 13:53:41 +0000 (14:53 +0100)]
mknod: Use mknodat if arch does not have the mknod syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 13:47:21 +0000 (14:47 +0100)]
unlink: Use unlinkat if arch does not have the unlink syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 13:45:14 +0000 (14:45 +0100)]
link: Use linkat if arch does not have the link syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 12:44:07 +0000 (13:44 +0100)]
access: Use faccessat if arch does not have the access syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 12:41:18 +0000 (13:41 +0100)]
chmod: Use fchmodat if arch does not have the chmod syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 10 Oct 2012 15:42:37 +0000 (16:42 +0100)]
dup2: Use dup3 if arch does not have the dup2 syscall
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 28 Nov 2012 11:38:46 +0000 (11:38 +0000)]
Makefile.in: Use non-legacy interfaces for new architectures
New architectures, which don't define ARCH_HAS_DEPRECATED syscalls, need
to use the new interfaces from libc/sysdeps/linux/generic-syscalls/bits/
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Fri, 23 Nov 2012 12:36:33 +0000 (12:36 +0000)]
Config.in: Introduce symbol for arches with deprecated syscalls
Linuxthreads(old and new) need deprecated syscalls to build. Existing
architectures support these system calls but new architectures don't.
This symbol has no functional change apart from hidding the Linuxthreads
symbols from arches that don't support them.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Wed, 28 Nov 2012 11:34:13 +0000 (11:34 +0000)]
libc/sysdeps: Add new interfaces for new architectures
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Henning Heinold [Sat, 4 Jun 2011 19:23:15 +0000 (21:23 +0200)]
libc: add non standard execvpe function
Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 17 Jan 2013 15:15:17 +0000 (15:15 +0000)]
libc/{arm, i386}/Makefile.arch: Don't build 64-bit code if LFS is disabled
Fixes the following compilation error:
_lfs_64.h: # error Do not include this header in files not built when LFS is disabled
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 10 Feb 2013 16:21:15 +0000 (17:21 +0100)]
stdlib: Fix fndecl of mkostemp, mkostemp64
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Sun, 10 Feb 2013 15:50:44 +0000 (16:50 +0100)]
test: run test{,_glibc} adjacent
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 17 Apr 2012 07:30:15 +0000 (09:30 +0200)]
libc: add posix_fallocate()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 7 Feb 2013 14:07:50 +0000 (15:07 +0100)]
buildsys: switch warning into a TODO
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Markos Chandras [Thu, 7 Feb 2013 12:38:44 +0000 (12:38 +0000)]
buildsys: Fix kbuild-style switch fallout
regressions introduced in
1b3025b7352f5e432ffa1c7adc57085ac9092b77
"buildsys: switch libc to kbuild-style"
unistd: Handle !UCLIBC_HAS_GET{, SUB}OPT cases
libc/libc_so.a(getsubopt-susv3.os): In function getsubopt':
getsubopt-susv3.c:(.text+0x0): multiple definition of getsubopt'
libc/libc_so.a(getsubopt.os):getsubopt.c:(.text+0x0):
first defined here.
The solution is to filter out the correct files when
UCLIBC_HAS_GETOPT and UCLIBC_HAS_GETSUBOPT are not defined.
inet: Move INET_RPC_{DIR, OUT} before CSRC_ALL
libc/libc_so.a(rpc_thread.oS): In function __rpc_thread_svc_max_pollfd':
rpc_thread.c:(.text+0x148): undefined reference to svc_max_pollfd'
libc/libc_so.a(rpc_thread.oS): In function __rpc_thread_svc_pollfd':
rpc_thread.c:(.text+0x184): undefined reference to svc_pollfd'
The CSRC_ALL variable uses the INET_RPC_DIR variable which is
initialized later on. We fix this problem by moving the
INET_RCP_{DIR,OUT} definitions before we use them in CSRC_ALL
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 5 Feb 2013 18:11:36 +0000 (19:11 +0100)]
mman: rename MAP_UNINITIALIZE to MAP_UNINITIALIZED
The name was changed to include a trailing 'D' when it went into the
kernel.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 5 Feb 2013 17:54:24 +0000 (18:54 +0100)]
buildsys: switch libc to kbuild-style
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 5 Feb 2013 17:52:47 +0000 (18:52 +0100)]
libpthread: Fix handling of SUBARCH includes
TARGET_SUBARCH can only ever be set if TARGET_ARCH is set.
Only include SUBARCH includes if SUBARCH is non-empty.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Ronald Wahl [Mon, 4 Feb 2013 13:51:46 +0000 (14:51 +0100)]
libc: atexit: reuse free slots at the end of exit functions table
Continuosly dlopen and dlclose of shared object will cause a memory leak
in atexit function. This fix reuse free slots at the end of the list.
For further detail see https://bugs.busybox.net/show_bug.cgi?id=2455
Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
Tested-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Mike Frysinger [Sat, 26 Jan 2013 22:43:32 +0000 (17:43 -0500)]
libc/inet: pull in stddef.h for NULL
Fixes a build error:
In file included from libc/inet/recv.c:8:0:
libc/inet/socketcalls.c: In function '__recv_nocancel':
libc/inet/socketcalls.c:203:57: error: 'NULL' undeclared (first use in this function)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 26 Jan 2013 22:40:24 +0000 (17:40 -0500)]
libc/sysdeps: sync bits/in.h with glibc
URL: https://bugs.busybox.net/show_bug.cgi?id=5888
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 26 Jan 2013 19:13:12 +0000 (14:13 -0500)]
buildsys: gen_bits_syscall_h: do not leave undefined SYS_xxx around
If we end up doing '#undef __NR_xxx', we don't want to leave the
corresponding SYS_xxx symbol defined. So undef it too.
For example, with the ARM EABI layer, we have a bunch of legacy
syscalls that we define early on and then later undefine (such
as __NR_utime). But we left SYS_utime defined so code that tests
for that define before using it would be broken (since it'd be
defined to a non-existent symbol).
URL: https://bugs.gentoo.org/425006
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 26 Jan 2013 19:05:02 +0000 (14:05 -0500)]
buildsys: gen_bits_syscall_h: clean up script
Just style changes here to make it more readable.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 26 Jan 2013 19:04:19 +0000 (14:04 -0500)]
buildsys: gen_bits_syscall_h: remove top_builddir references
This script hasn't used this var in a while (it writes to stdout), so
drop all mention/usage of it.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 26 Jan 2013 18:44:47 +0000 (13:44 -0500)]
buildsys: allow the toolchain to search its dirs for kernel headers
Setting KERNEL_HEADERS up to the exact path all the time is a pita,
especially when the toolchain is often times already configured to
do the right thing. So if the user has set that to "", don't force
any specific paths.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 26 Jan 2013 18:43:20 +0000 (13:43 -0500)]
buildsys: clean up path scrubbing a bit
This just makes it easier to read -- no functional changes.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 26 Jan 2013 18:18:06 +0000 (13:18 -0500)]
libc/sysdeps: dup3: fix typo in comment
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Bernhard Reutner-Fischer [Mon, 21 Jan 2013 11:21:02 +0000 (12:21 +0100)]
libc: fix typo in statvfs
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 21 Jan 2013 11:14:39 +0000 (12:14 +0100)]
libc: fix typo in statvfs
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Fri, 18 Jan 2013 10:12:49 +0000 (11:12 +0100)]
mount.h: update
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 17 Jan 2013 21:46:24 +0000 (22:46 +0100)]
statfs: towards _STATFS_F_FLAGS
preparatory work.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 17 Jan 2013 21:44:00 +0000 (22:44 +0100)]
statfs: support f_frsize
closes bugzilla #5834
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 17 Jan 2013 18:29:22 +0000 (19:29 +0100)]
socket.h: pull socket_type.h from eglibc
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 16 Jan 2013 12:58:54 +0000 (13:58 +0100)]
config: improve help of UCLIBC_HAS_RESOLVER_SUPPORT
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 16 Jan 2013 12:36:40 +0000 (13:36 +0100)]
buildsys: link libgcc_eh if DODEBUG
with -O0 we (e.g. lockf) might end up with references to
_Unwind_Resume, so pull in gcc_eh in this case..
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 16 Jan 2013 11:23:58 +0000 (12:23 +0100)]
getpwnam: hide relocation
The non-reentrant version of getpwnam is used in the RPC code (for
!HAS_REENTRANT_RPC)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 14 Jan 2013 16:52:28 +0000 (17:52 +0100)]
LT.old: reinstate build
As noted by Florian Fainelli:
LD libpthread-0.9.34-git.so
libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `fcntl64':
wrapsyscall.c:(.text+0xd8): undefined reference to `__libc_fcntl64'
libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `lseek64':
wrapsyscall.c:(.text+0x190): undefined reference to `__libc_lseek64'
libpthread/linuxthreads.old/libpthread_so.a(wrapsyscall.oS): In function `pread64':
wrapsyscall.c:(.text+0x39c): undefined reference to `__libc_pread64'
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 14 Jan 2013 13:27:58 +0000 (14:27 +0100)]
buildsys: use kbuild style, fix omission
forgot this hunk in
d0234b16d61f06b2a3fd6241eff8c81250283a60
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 10 Jan 2013 16:02:39 +0000 (17:02 +0100)]
buildsys: use kbuild style
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Thu, 10 Jan 2013 09:51:16 +0000 (10:51 +0100)]
buildsys: remove superfluous default n
kconfig's default defaults to n so spelling out default n is redundant
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Florian Fainelli [Wed, 9 Jan 2013 15:17:21 +0000 (16:17 +0100)]
libc: add {get,set,swap,make}context user context manipulation functions
Add the obsolescent SUSv3 family of user context manipulating functions
for arm, i386, mips, x86_64.
Signed-off-by: Timon ter Braak <timonterbraak@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Timo Teräs [Tue, 8 Jan 2013 09:55:26 +0000 (11:55 +0200)]
dl: fix dlsym lookups with RTLD_NEXT
The current code for dlsym() when invoked with RTLD_NEXT lookup
searches for the module where it's being called from, and executes the
_dl_find_hash only for the next module in the chain. However, if the
looked symbol is not there, the rest of the modules are not checked.
Generally this is not a problem as symbols are merged for the parent
modules; so this affects only RTLD_NEXT.
This patch adds a loop iterating through all the following modules.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Reviewed-by: Filippo ARCIDIACONO <filippo.arcidiacono@st.com>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 Jan 2013 11:07:14 +0000 (12:07 +0100)]
buildsys: prevent make from searching for .config
Fixes:
make distclean
mkdir /.config
make -C test/API clean
Reading makefile `../../.config' (search path) (don't care) (no ~ expansion)...
make: *** ../../.config: Is a directory. Stop.
write(1, "Reading makefile `../../.config'"..., 80) = 80
open("../../.config", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/include/../../.config", O_RDONLY) = 6
fstat(6, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
read(6, 0x7f2fe3bfc000, 4096) = -1 EISDIR (Is a directory)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Tue, 8 Jan 2013 08:43:01 +0000 (09:43 +0100)]
arm: workaround GCC PR target/53735 with fork()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 18 Jun 2012 09:18:10 +0000 (11:18 +0200)]
libc: handle sync_file_range
Add cancellation and support arm, ppc64, mips32.
Compile-tested.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Filippo Arcidiacono [Mon, 10 Dec 2012 08:50:52 +0000 (09:50 +0100)]
arm: clone: restore stack pointer just after return from syscall
If the syscall returns with an error the stack pointer and r4 register
are not restored because the instruction 'ldmnefd sp!, {r4}' is executed
after branching to '__error' label.
This bug has been spotted out by running './utstest clone 5' from LTP
built with -fstack-protector-all compiler flag as log below:
root@cortex-a9:/usr/tests/ltp/testcases/bin# ./utstest clone 5
stack smashing detected: ./utstest terminated()
Regression introduced by commit
e58798e107d652644629a1daaa95d76430808d53
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Giuseppe Di Giore <giuseppe.di-giore@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Chris Zankel [Wed, 5 Dec 2012 22:00:44 +0000 (14:00 -0800)]
xtensa: fix setjmp that didn't save all registers correctly
Setjmp was only saving the lower order of registers (a0-a3) correctly, but
not the higher ones (a4-a8/a12).
The change also includes additional information, and renames many of the
registers, so that setjmp and longjmp look more like the inverse of
each other.
Signed-off-by: Chris Zankel <chris@zankel.net>
Bernhard Reutner-Fischer [Sat, 24 Nov 2012 17:26:00 +0000 (18:26 +0100)]
sched.h: include stdlib.h for malloc/free
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
James Hogan [Fri, 30 Nov 2012 10:08:13 +0000 (10:08 +0000)]
update ptrace.h to latest from glibc
Update libc/sysdeps/linux/common/sys/ptrace.h to latest from glibc's
sysdeps/unix/sysv/linux/sys/ptrace.h.
This adds definitions for operations:
- PTRACE_GETREGSET
- PTRACE_SETREGSET
- PTRACE_SEIZE
- PTRACE_INTERRUPT
- PTRACE_LISTEN
And adds flags:
- PTRACE_SEIZE_DEVEL
And adds event codes:
- PTRACE_EVENT_SECCOMP
This is to allow access to the generic interface for accessing
architecture specific regsets using the corresponding NT_* types,
required for new Linux kernel architecture ports.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Fri, 30 Nov 2012 01:32:02 +0000 (20:32 -0500)]
libc/stdlib: localize __unix_grantpt
When ASSUME_DEVPTS is disabled, we end up exporting __unix_grantpt and
get a reloc to it from grantpt. Mark it static to fix all of that.
Reported-by: Michael Deutschmann <michael@talamasca.ocis.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 18 Nov 2012 11:17:03 +0000 (06:17 -0500)]
drop support for pre ISO-C compilers
This drops __signed, __volatile, and __const. Only the latter was
used in the code base, and for uClibc, not consistently. Much of
the code used plain "const" which meant "__const" was useless.
Really, the point of this is to stay in sync with what glibc did.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 18 Nov 2012 11:03:05 +0000 (06:03 -0500)]
Replace FSF snail mail address with URLs
This matches a similar change made to glibc.
No functional changes here.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Felix Fietkau [Fri, 21 Sep 2012 15:29:13 +0000 (17:29 +0200)]
AVR32: declare missing result variable
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 18 Nov 2012 09:49:32 +0000 (04:49 -0500)]
nptl: fix gcc noreturn warning
Current builds show the warning:
CC libpthread/nptl/pthread_create.os
libpthread/nptl/pthread_create.c: In function 'start_thread':
libpthread/nptl/pthread_create.c:418:3: warning: function declared
'noreturn' has a 'return' statement [enabled by default]
libpthread/nptl/pthread_create.c:418:3: warning: 'noreturn' function
does return [enabled by default]
Looking at glibc, it does not mark this function as noreturn. Testing
code size, gcc is smart enough to detect the code never actually returns
regardless of the attribute. So drop it to keep in sync with glibc and
to avoid the warnings.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 18 Nov 2012 09:49:32 +0000 (04:49 -0500)]
nptl: fix gcc noreturn warning
Current builds show the warning:
CC libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.os
libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c: In function 'helper_thread':
libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c:142:3: warning:
function declared 'noreturn' has a 'return' statement [enabled by default]
Looking at glibc, it does not mark this function as noreturn. Testing
code size, gcc is smart enough to detect the while(1){} never actually
returns regardless of the attribute. So drop it to keep in sync with
glibc and to avoid the warning.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sun, 18 Nov 2012 09:41:06 +0000 (04:41 -0500)]
ldso: include dlfcn.h for RTLD_NODELETE
Building with NPTL enabled and shared library support disabled we hit:
In file included from libpthread/nptl/sysdeps/generic/dl-tls.c:30:0:
./ldso/include/dl-elf.h: In function '__dl_parse_dynamic_info':
./ldso/include/dl-elf.h:173:20: error: 'RTLD_NODELETE' undeclared (first use in this function)
./ldso/include/dl-elf.h:173:20: note: each undeclared identifier is reported only once for each function it appears in
make: *** [libpthread/nptl/sysdeps/generic/dl-tls.os] Error 1
A previous commit (
f26c5f6952ce9bf8edec9c1571c47addb1bcc442) touched
on a similar issue, but added the include to the incorrect location.
Reported-by: Christophe Lyon <christophe.lyon@st.com> [arm nommu]
Reported-by: Daniel Beecham <daniel@lunix.se> [static x86_64]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 17 Nov 2012 20:45:37 +0000 (15:45 -0500)]
string/microblaze: fix preprocessor style
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Sat, 17 Nov 2012 20:29:16 +0000 (15:29 -0500)]
libc/sysdeps: dup3: check for __NR_dup3 since older kernels/arches lack it
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Thomas Schwinge [Wed, 31 Oct 2012 19:41:50 +0000 (20:41 +0100)]
include/elf.h: update for ELFOSABI_* changes.
ELFOSABI_GNU replaces ELFOSABI_LINUX, the latter is kept as a compatibility
alias, and ELFOSABI_HURD is removed. See the table on
<http://www.sco.com/developers/gabi/latest/ch4.eheader.html#osabi> for
reference.
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mike Frysinger [Wed, 14 Nov 2012 05:30:54 +0000 (00:30 -0500)]
libc/stdlib: add mkostemp helpers
Some projects (like udev) are starting to use this.
Imported from glibc.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Wed, 14 Nov 2012 05:08:18 +0000 (00:08 -0500)]
libc/sysdeps: add dup3 syscall wrapper
Some projects (like udev) are starting to use this.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Wed, 14 Nov 2012 05:07:03 +0000 (00:07 -0500)]
include/: ignore more symlinks
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Chris Zankel [Wed, 7 Nov 2012 00:40:15 +0000 (16:40 -0800)]
test/math: add libm-test-ulps-xtensa file
Add ulps file for Xtensa for the math test.
Signed-off-by: Chris Zankel <chris@zankel.net>
Steve Bennett [Fri, 21 Sep 2012 05:38:41 +0000 (15:38 +1000)]
string/microblaze: Fix for little-endian
Fix the asm-optimised memcpy and memmove so they
work for little-endian as well as big-endian.
Testing has shown no issues, but I am not a microblaze
asm expert so YMMV.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Steve Bennett [Fri, 21 Sep 2012 05:35:05 +0000 (15:35 +1000)]
microblaze/bits/setjmp.h: Fix stray #endif
Introduced in
c53099f7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Chris Zankel [Thu, 18 Oct 2012 00:46:43 +0000 (17:46 -0700)]
xtensa: add missing atomic intrinsics
Add more atomic intrinsics. These are mostly non 32-bit versions, which
are not support by Xtensa. This file needs some more clean-up and
consolidation.
Signed-off-by: Chris Zankel <chris@zankel.net>
Chris Zankel [Thu, 18 Oct 2012 00:45:03 +0000 (17:45 -0700)]
xtensa: sysdep.h needs to include sys/syscall.h
The Xtensa version of sysdep.h didn't include sys/syscall.h. This header
file is, for example, needed by not-cancel.h, which uses the
INTERNAL_SYSCALL macro.
Signed-off-by: Chris Zankel <chris@zankel.net>
Chris Zankel [Wed, 17 Oct 2012 23:15:07 +0000 (16:15 -0700)]
xtensa: add a stub user.h file
Xtensa only supports the ELF binary format, so the user.h file isn't
needed. However, it's included by other files, so provide a stub user.h.
Signed-off-by: Chris Zankel <chris@zankel.net>
Chris Zankel [Wed, 17 Oct 2012 23:13:15 +0000 (16:13 -0700)]
ldd: ELFCLASSM was not defined for the Xtensa architecture
Signed-off-by: Chris Zankel <chris@zankel.net>
Chris Zankel [Wed, 17 Oct 2012 23:11:19 +0000 (16:11 -0700)]
xtensa: fix a misnumbered register in sigsetjmp
Signed-off-by: Chris Zankel <chris@zankel.net>
Chris Zankel [Wed, 17 Oct 2012 23:08:38 +0000 (16:08 -0700)]
xtensa: add a set of atomic intrinsics
Add a new file that provides various atomic intrinsics, which use the
conditional store instruction.
Signed-off-by: Chris Zankel <chris@zankel.net>
Chris Zankel [Wed, 17 Oct 2012 23:02:01 +0000 (16:02 -0700)]
xtensa: use atomic instructions instead of a syscall
Replace system calls with atomic instructions for 'compare and swap'
in linuxthreads.old.
Signed-off-by: Chris Zankel <chris@zankel.net>
Chris Zankel [Wed, 17 Oct 2012 23:01:24 +0000 (16:01 -0700)]
xtensa: add sigcontext.h
Signed-off-by: Chris Zankel <chris@zankel.net>
Will Newton [Tue, 16 Oct 2012 10:54:39 +0000 (11:54 +0100)]
_scanf.c: Implement 'm' modifier for 'c' and '[' conversions.
The current code implements the 'm' modifier only for 's'
conversions and would cause a segfault if it was used for 'c'
or '[' conversions. This patch extends the code to cover these
cases too.
Signed-off-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 31 Oct 2012 14:18:58 +0000 (15:18 +0100)]
utils: Fix missing semicolon
Thanks to Manuel RĂ¼ger for spotting this one.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Wed, 31 Oct 2012 09:17:41 +0000 (10:17 +0100)]
__uclibc_main: remove stray trailing space
test post-receive hook
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 29 Oct 2012 12:16:02 +0000 (13:16 +0100)]
test: Fix some warnings in inet
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer [Mon, 29 Oct 2012 12:08:07 +0000 (13:08 +0100)]
test: handle !DO_C99_MATH
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Chris Packham [Mon, 1 Oct 2012 05:12:54 +0000 (18:12 +1300)]
libc/sysdeps: add __kernel_long and __kernel_ulong
Linux 3.4 added __kernel_long_t and __kernel_ulong_t and various
exported header files were updated to use these new types. Add the
definitions for __kernel_long_t and __kernel_ulong_t to the relevant
kernel_types.h headers.
This change was automated with the following scriptlet
git grep --name-only 'typedef.*__kernel_old_dev_t' \
| xargs sed -i '/typedef.*__kernel_old_dev_t/ a\
typedef long\t\t__kernel_long_t;\
typedef unsigned long\t__kernel_ulong_t;'
Whitespace in arm, avr32, hppa, sparc was then manually fixed up.
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
--
Here's a cleaned up patch which should get the whitespace right. I'm a
bit iffy about the sparc changes they make sense to me but it's not a
platform I have access to.
I can break this up per arch or per maintainer if requested.
libc/sysdeps/linux/alpha/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/arm/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/avr32/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/bfin/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/c6x/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/cris/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/e1/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/h8300/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/hppa/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/i386/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/ia64/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/m68k/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/microblaze/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/mips/bits/kernel_types.h | 4 ++++
libc/sysdeps/linux/nios2/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/powerpc/bits/kernel_types.h | 4 ++++
libc/sysdeps/linux/sh/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/sh64/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/sparc/bits/kernel_types.h | 4 ++++
libc/sysdeps/linux/v850/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/x86_64/bits/kernel_types.h | 2 ++
libc/sysdeps/linux/xtensa/bits/kernel_types.h | 2 ++
22 files changed, 50 insertions(+)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Filippo Arcidiacono [Thu, 12 Jul 2012 07:24:39 +0000 (09:24 +0200)]
librt: re-add SIGCANCEL to the list of blocked signal in helper thread
Indeed if the libpthread is before the libc in the library look up
the SIGCANCEL is removed from the list of the blocked signal by
sigfillset func, this can produce the handler not properly called.
This commit revert what Denys modified in commit
162cfaea20d807f0ae329efe39292a9b22593b41.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Natanael Copa [Thu, 5 Jul 2012 11:55:19 +0000 (11:55 +0000)]
i386/bits/syscalls.h: allow immediate values as 6th syscall arg
Allow use of immedate values as the 6th syscall argument. Otherwise we must
store the arg on memory. This gives gcc more options to optimize better.
This also works around an issue with posix_fallocate.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter Korsgaard [Tue, 3 Jul 2012 13:54:57 +0000 (15:54 +0200)]
bits/time.h: sync with glibc 2.16
CLOCK_MONOTONIC_RAW is available since 2.6.28
(
2d42244ae71d: clocksource: introduce CLOCK_MONOTONIC_RAW), and
CLOCK_*_COARSE since 2.6.32 (
da15cfdae033: time: Introduce
CLOCK_REALTIME_COARSE).
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Will Newton [Fri, 29 Jun 2012 13:48:09 +0000 (14:48 +0100)]
libc/inet/resolv.c: Use IE model for TLS data.
All other TLS data in uClibc is explicitly using the IE model,
so use it for __resp too. This generates smaller and faster
code.
Signed-off-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>