summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-15nds32: Add syscall macros for 5 and 6 parametersStafford Horne
This is to fix an error after switching to use generic syscalls. libc/sysdeps/linux/common/syscall.c: In function 'syscall': libc/sysdeps/linux/common/syscall.c:27:2: warning: implicit declaration of function 'internal_syscall_ncs6' [-Wimplicit-function-declaration] return INLINE_SYSCALL_NCS(sysnum, 6, arg1, arg2, arg3, arg4, arg5, arg6); ^ Defining these functions as described by Vincent Ren-Wei Chen <vincentc@andestech.com> Signed-off-by: Stafford Horne <shorne@gmail.com>
2018-01-15nds32: Use new common syscall() implementationStafford Horne
Traditionally nds32 has had a generic syscall implementation supporting varargs. During an audit it was found that this implementation seems to duplicate the new common implementation and is no longer needed. Signed-off-by: Stafford Horne <shorne@gmail.com>
2018-01-15or1k: Use new common syscall() implementationStafford Horne
Now that the common syscall implementation supports vararg calling conventions we can safely use it on OpenRISC. This saves a bit of code in the openrisc implementation. Signed-off-by: Stafford Horne <shorne@gmail.com>
2018-01-15syscall: Make common implementation match unistd.hStafford Horne
The definition of syscall() in unistd.h is with varargs. Traditionally the common implementation in uclibc has been with regular arguments. This patch updates that by using varargs. This has caused issues on architectures like or1k which have different calling conventions for varargs and regular arg parameters. The implementation here is based on an implementation from Joel Stanley <joel@jms.id.au>. There is a difference that I do not initialize the stack args with 0 as they are immediately overwritten by va_args. Signed-off-by: Stafford Horne <shorne@gmail.com>
2018-01-08csky: bugfix libc sync_file_range.c for csky.Guo Ren
Use __NR_sync_file_range2 for csky sync_file_range function. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2018-01-06ld.so: Rewrite elf_machine_load_address using _DYNAMIC symbolWaldemar Brodkorb
Sync with GNU C library commit: commit a68ba2f3cd3cbe32c1f31e13c20ed13487727b32 Author: Szabolcs Nagy <szabolcs.nagy@arm.com> Date: Wed Oct 18 17:26:23 2017 +0100 Fixes issues with binutils version > 2.29.1.
2018-01-03fdpic: fix ld.so crashingWaldemar Brodkorb
Newer binutils is creating a section INIT_ARRAY from any .init_array and .ctors in the code. When ld.so runs initialization functions for loaded objects with _dl_run_init_array() it crashes on Bfin FDPIC system. It is trying to execute the function in pthread.c, which is no longer useful with the combined C library approach. Gcc -Wl,-M debugging output was very useful to find the reason for the INIT_ARRAY section.
2018-01-02quieten compiler warnings when __UCLIBC_HAS_FENV__ isn't definedWaldemar Brodkorb
2018-01-02remove COMPAT_ATEXITWaldemar Brodkorb
2017-12-31m68k: add NPTL/TLS supportWaldemar Brodkorb
Port over NPTL/TLS support from GNU C Library. In the first step only the slower syscall is used for TLS access. The uClibc-ng testsuite shows 79 errors, so their is room for bugfixes and improvements.
2017-12-28csky: add Copyright.Guo Ren
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-12-27add Stafford as OpenRisc Maintainer, agreed on IRCWaldemar Brodkorb
2017-12-26csky: remove -mcpu and -mhard-float from configGuo Ren
Pass the -mcpu and -mhard-float from UCLIBC_EXTRA_CFLAGS instead. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-12-16sh: remove assembly code from NPTLWaldemar Brodkorb
2017-12-10or1k: syscall: Pass arguments on the stackJoel Stanley
Busybox internally calls syscall(2). - in unistd.h defined something like int syscall(nr, ....) - in syscall.c (common) implemented as int syscall(nr, arg1, arg3, arg3, arg4, arg5, arg6) This will not work, busybox thinks syscall should have varargs calling conventions. But it doesnt in the uclibc implementation so no args go through. Most architectures this will work. But on openrisc varargs are all sent on the stack. Regular args are passed in registers. Commit message and idea from Stafford Horne <shorne@gmail.com>. Signed-off-by: Joel Stanley <joel@jms.id.au>
2017-12-10librt: fix gcc warningWaldemar Brodkorb
2017-12-10INSTALL: add some notes how to create Linux headers directoryWaldemar Brodkorb
2017-12-03fenv: only allow to enable for supported architecturesWaldemar Brodkorb
2017-12-03x86_64: add fenv support from glibcWaldemar Brodkorb
2017-11-28Fix build regression with DO_XSI_MATH disabledRonald Wahl
Commit ea38f4d89 (math: add exception handling functionality) adds a regression so that build configurations that have DO_C99_MATH enabled and DO_XSI_MATH disabled will not link. This commit moves the files with the bessel functions from DO_C99_MATH to DO_XSI_MATH. It looks like they are not even contained in C99. Signed-off-by: Ronald Wahl <ronald.wahl@raritan.com>
2017-11-27bump for releasev1.0.27Waldemar Brodkorb
2017-11-25statfs.h: add f_flagsWaldemar Brodkorb
Add missing member in struct statfs. It is used by xfsprogs (f.e. 4.13.1). Reported-by: Joshua Kinard <kumba@gentoo.org>
2017-11-25or1k: Fix tls value passed during cloneStafford Horne
From or1k-glibc from blueCmd, his commit "Fix TLS, removed too much in rebase". Signed-off-by: Stafford Horne <shorne@gmail.com>
2017-11-25setjmp/longjmp saves only non-call clobbered regsChristian Svensson
Previously we saved everything, but we only need to save the registers that are promised to be untouched by the setjmp call.
2017-11-25Update __longjmp.SChristian Svensson
2017-11-25or1k: correctly pass tid in 4th paramStafford Horne
2017-11-25Only emulate fstatfs64 if __NR_fstatfs64 is not definedEugene Rudoy
Follow-up of e3d6c8bffe79b2c070bc7a3aabc9d9c65f6b099e Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Ralf Friedl <Ralf.Friedl@online.de>
2017-11-25fix regression from a745c4bfc8a9b5db4e48387170da0dc1d39e3abeWaldemar Brodkorb
2017-11-24utils: add EM_MCORE for csky machine.Guo Ren
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-11-22remove misleading comment about f_frsize fieldEugene Rudoy
It is supported both in the sense of being contained in mips version of statfs/statfs64 structs and also in the sense that it's filled by the corresponding kernel syscalls. It is UNsupported in that sense that it's value is the same as that of f_bsize (at least on older kernel versions, the oldest version tested is 2.6.13), s. [1] and [2] for details ([1] is the latest kernel version as of now, [2] is the oldest kernel version git history is available for). [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/fs/statfs.c?h=v4.14-rc7#n64 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/fs/open.c?h=v2.6.12-rc2#n41 Follow-up of 68de9946e914d8c30dcc6667a059ea59e5b74cac Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Ralf Friedl <Ralf.Friedl@online.de>
2017-11-22librt: fix broken posix_spawnWaldemar Brodkorb
Fix iteration over signals, synced with GNU C library code and pending patches. Issues found when running dhcpcd with hook scripts. (exit status 127) Reported-By: kapeka <kapeka@bering-uclibc.de>
2017-11-19csky: port to uclibc-ngGuo Ren
Follow the steps to build c-sky uclibc linux system: 1. git clone https://github.com/c-sky/buildroot.git 2. cd buildroot 3. make qemu_csky_ck810_uclibc_defconfig 4. make Follow the buildroot/board/qemu/csky/readme.txt to run. This buildroot toolchain is pre-build, But you can rebuild the c-sky uclibc-ng alone and install it to the buildroot sysroot manually. We'll try our best to improve the uclibc-ng continuously. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-11-19linuxthreads: add dummy for pthread_atforkWaldemar Brodkorb
For noMMU targets we need a pthread_atfork dummy, otherwise libraries like libressl using pthread_atfork, but not fork() for itself, can not be used. But software like curl with ssl support linking against libressl still work fine on noMMU targets.
2017-11-19remove unused FORTIFY code fragmentsWaldemar Brodkorb
2017-11-18use the right file for tls in buildStafford Horne
Signed-off-by: Stafford Horne <shorne@gmail.com>
2017-11-18use atomic instructions for atomicsStafford Horne
Signed-off-by: Stafford Horne <shorne@gmail.com>
2017-11-16or1k: remove unused fileWaldemar Brodkorb
2017-11-03math: add exception handling functionalitySergey Cherkashin
According to standards SVID and SYSV. Modified lgamma calling in case when 'signgam' variable should not be used. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-03Define _STATFS_F_FRSIZE for MIPSWaldemar Brodkorb
After discussion on the busybox mailinglist. Reported-by: Ralf Friedl <Ralf.Friedl@online.de> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-03Only emulate statfs64 if __NR_statfs64 is not definedWaldemar Brodkorb
After discussions on the busybox mailinglist. Reported-by: Ralf Friedl <Ralf.Friedl@online.de> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-03fix multilib dirWaldemar Brodkorb
Signed-off-by: Alex Potapenko <opotapenko@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-03malloc-standard/malloc.h: use getpagesizeYitai Schwartz
sysconf creates a lot of code dependencies. getpagesize dosen't. staticly linked code that calls malloc is now much smaller. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2017-11-02convert accept4() to use cancel.h macrosWaldemar Brodkorb
2017-10-11h8300: remove dead codeWaldemar Brodkorb
As h8/300 architecture does not use deprecated syscalls after reintroduction into Linux upstream, this part of the code in vfork.S is always unused.
2017-10-10libpthread/nptl: bugfix compile warning.Guo Ren
warning: unused variable 'self' [-Wunused-variable] Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-10-08socketcall: fix compile issue with older Linux kernelWaldemar Brodkorb
2017-10-01recvmmsg/sendmmsg: add recvmmsg sendmmsg support.Guo Ren
The recvmmsg and sendmmsg is very important for UDP stream application. If we only use recvmsg for UDP stream, it will only copy one mtu size of data in a syscall. And recvmmsg copy as many as you want in a syscall. So recvmmsg is more efficient,and some applications will depends on the recvmmsg and sendmmsg, eg: UDP media stream player. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-10-01statfs: bugfix statfs02 fstatfs02 failed in ltp-testsuiteGuo Ren
In the test-case of statfs from ltp-testsuite, it pass -1 to 2th argument. eg: fstatfs(fd , -1) When uclibc-ng parse the buf32 to buf will cause illegal address access, the kernel will signal the process with SIGSEGV. If we pass the -1 directly to the syscall of statfs/fstatfs, kernel use copy_to_user() to prevent the signal of SIGSEGV and just return EINVAL. This is the ltp-testsuite expect. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-10-01preadv/pwritev: bugfix preadv/pwritev syscall should be 5 argsGuo Ren
The current uclibc-ng use 4 arguments, and this will cause ltp-testsuite's preadv/pwritev case failed. The syscall of preadv/pwritev in current linux-kernel is 5 arguments: linux/fs/read_write.c: SYSCALL_DEFINE5(preadv, unsigned long, fd, const struct iovec __user *, vec, unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h) SYSCALL_DEFINE5(pwritev, unsigned long, fd, const struct iovec __user *, vec, unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h) So just update to 5-args-syscall, and off_t could be 32bit or 64bit. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2017-09-14ldconfig: add glibc compatibility fixWaldemar Brodkorb
Reported-by: Lauri Kasanen <cand@gmx.com>