summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
AgeCommit message (Collapse)Author
2016-03-31xtensa: fix __sigsetjmp call12 caseMax Filippov
Register window saving loop in __sigsetjmp incorrectly calculates offset in the jmp_buf in case it was called with call12. The bug was introduced in commit f4b1b7ade7971141 "xtensa: fix setjmp that didn't save all registers correctly". Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-03-10ia64: sync with glibc headersWaldemar Brodkorb
2016-02-29arm: fix __JMP_BUF_SP definitionMax Filippov
__JMP_BUF_SP is the index of a stack pointer slot in the __jmp_buf. According to ARM __sigsetjmp code it does not depend on configuration parameter __UCLIBC_HAS_FPU__. Make its definition unconditional. __JMP_BUF_SP is used in the unwind_stop through the _JMPBUF_CFA_UNWINDS_ADJ macro, this change fixes cleanup routines call on thread cancellation in configurations with hard FP. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-02-24xtensa: fix stack unwinding over __default_sa_restorerMax Filippov
For some xtensa cores generated code gets arranged so that __default_sa_restorer immediately follows preceding function. E.g.: 40a1b: c03340 sub a3, a3, a4 40a1e: f01d retw.n 00040a20 <__default_sa_restorer>: 40a20: e1a022 movi a2, 225 40a23: 005000 syscall ... Contents of the .eh_frame section: ... 000007f4 00000014 000007f8 FDE cie=00000000 pc=0004076c..00040a20 DW_CFA_advance_loc4: 3 to 0004076f DW_CFA_def_cfa_offset: 48 Due to the way xtensa libgcc uw_frame_state_for calls _Unwind_Find_FDE for non-signal frames, FDE for the previous function is found during thread cancellation signal stack unwinding in that case. Signal stack frame is not recognized and is not unwound properly, breaking cleanup routines calling for cancelled thread. Insert padding before the __default_sa_restorer so that no FDE is found for it, MD_FALLBACK_FRAME_STATE_FOR is called by uw_frame_state_for and the frame is correctly recognized as signal frame. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2016-02-07frv: resurrect port somehow, totally untestedWaldemar Brodkorb
The FR-V port is really broken, and I have no emulator or hardware for this platform. I tried to get some hardware from RedHat, who made the FR-V port initially. Unfortunately Fujitsi didn't agreed to sent me some of their unused spare hardware lying @RedHat. As I invested some time to get stuff compiled, I decided to add the code and may be anytime later I can gain access to some emulator or hardware. GDB simulator for FR-V doesn't support booting Linux AFAIK.
2016-01-31mips: fix clashing symbolsWaldemar Brodkorb
ISC bind9 uses ptrsize, better use something else. Reported-By: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-01-31Provide __adjtimex() alias, like glibc.Leonid Lisovskiy
Althought recent versions of sofware don't require it, old ntpd wants - see http://bugs.ntp.org/show_bug.cgi?id=769 Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-01-30add exp10() from glibcWaldemar Brodkorb
Some software make use of exp10, so add it. Basic testing with LTP. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-01-27nios2: allow to build toolchainWaldemar Brodkorb
At least allow to compile a toolchain targeting nios2 without MMU.
2016-01-25hppa: unbreak toolchain buildingWaldemar Brodkorb
At least allow to build a toolchain for hppa. Sync some headers with glibc.
2016-01-12Suppress warning "_GNU_SOURCE" redefinedWaldemar Brodkorb
libc/sysdeps/linux/common/euidaccess.c:1:1: warning: "_GNU_SOURCE" redefined In file included from <command-line>:0: ./include/libc-symbols.h:52:1: warning: this is the location of the previous definition Signed-Off-By: Leonid Lisovskiy <lly.dev@gmail.com>
2016-01-10h8300: O_DIRECT and O_DIRECTORY swapping.Yoshinori Sato
Different define of latest kernel. kernel define is #define O_DIRECT 00040000 /* direct disk access hint */ #define O_DIRECTORY 00200000 /* must be a directory */ Yoshinori Sato <ysato@users.sourceforge.jp>
2016-01-10Add implementation for copysignl for i386Waldemar Brodkorb
Patch from OpenWrt. Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-01-10Provide XTI __t_scalar_t types, like glibcWaldemar Brodkorb
Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-01-06Remove alias.Yoshinori Sato
open_cancel and open2_cancel have diffrent argument on open. So can't alias this functions. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2016-01-06openat argument fix.Yoshinori Sato
If argument passing to register case (ex. -mregparam=3). This case set all parameters set to register from caller. But callee refer to stack. So can't get parameter. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2016-01-06__ARCH_HAS_DEPRECATED_SYSCALLS__ case fix. getdents is deprecated.Yoshinori Sato
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2016-01-06h8300: vfork flags update.Yoshinori Sato
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
2016-01-06extra/Configs/Config.in: add syncfs() to Linux-specific functionsAnthony G. Basile
syncfs() was recently added (commit dfa593d4d). But man sync(2) specifies that syncfs() is Linux-specific. This was overlooked in the original commit so we add it to the set of Linux-specific functions supported by uClibc. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-01-02lm32: fix testsuite compile problemsWaldemar Brodkorb
One test fails to compile with a gcc ICE, so disable it for now.
2016-01-02lm32: add missing typesWaldemar Brodkorb
2016-01-02remove deprecated architectures v850/i960Waldemar Brodkorb
Both architectures are more or less deprecated. No Linux upstream support, no gcc support for uClinux.
2016-01-01Add argp implementationSalvatore Cro
Argp is an advanced support for parsing unix-style argument vectors. In addition to the common getopt interface, it provides automatic response to `--help' and `--version' options and use of custom parser in conjunction with argp native option parser, among others. Argp support is required by elfutils package and prelink. In uClibc argp functionalities has been moved from C library to libuargp.so Further the libc.so linker script contains an AS_NEEDED entry so that it doesn't need to link libuargp.so explicitely. Disable argp test if feature disabled. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-01-01Fix "pselect: Use linux pselect6 syscall when available"Leonid Lisovskiy
Commit e3c3bf2b58 introduce use of pselect6, but has following disadvantages: * Use of userspace types in args67 structure - it breaks, for example, configs when 32-bit uClibc-ng compiled against 64-bit kernel. Syscall will always return EINVAL. We must use __kernel_* types and __SYSCALL_SIGSET_T_SIZE. * It have excess checks for NSEC_PER_SEC. Original code from select() implementation has struct timeval => struct timespec conversion, kernel select() syscall implementation do the same. But none of libc versions (glibc, eglibc, musl) I know, perform similar checks for pselect() - there is no structure fields conversions, just struct timespec through all the calls. To have such checks in uClibc-ng we need one example, at least. * It is possible to avoid extra userspace reads from kernel code if sigmask == NULL. I suggest to do it, for a few bytes cost. * Commit didn't add test case to testsuite. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2015-12-29xtensa: fix vfork return address calculationsMax Filippov
vfork internally unwinds stack up one frame, saving the original return address in the a3 of the unwound frame. To do this in windowed ABI it needs to exchange two topmost bits of the original return address and of the helper entry point. Current code doesn't do it correctly for addresses above 0x40000000, resulting in illegal instruction exception for configurations that put code high, e.g. for noMMU. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-12-22pselect: Use linux pselect syscall when availableNicolas S. Dade
Linux has a pselect syscall since 2.6.something. Using it rather than emulating it with sigprocmask+select+sigprocmask is smaller code, and works properly. (The emulation has race conditions when unblocked signals arrive before or after the select) The tv.nsec >= 1E9 handling comes from uclibc's linux select() implementation, which itself uses pselect() internally if the pselect syscall exists. I though it would be good to do the same here. Note that although the libc pselect() API has 6 arguments, the linux kernel syscall as 7 arguments. There is an extra, somewhat vestigial, sizeof the signal mask argument. Signed-off-by: Nicolas S. Dade <nic.dade@gmail.com>
2015-12-22Do define some IPv6 related symbols even with IPv6 disabledWaldemar Brodkorb
Fixes compilation of some faulty applictions. Patch from Freetz.org Reported-by: Leonid Lisovskiy <lly.dev@gmail.com>
2015-12-17Add implementation for copysignl for ppcKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2015-12-17libc/stdio: Rework custom streams interface similar to glibc.Waldemar Brodkorb
Save 20 bytes per FILE structure, avoid indirect call for read/write/seek/close operations for normal streams. Additionally, custom streams has fileno = -2 now, like in glibc. bloat-o-meter report (UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y): function old new delta fopencookie 69 131 +62 ftello64 233 260 +27 fseeko64 298 319 +21 fclose 423 442 +19 .rodata 16696 16708 +12 fileno_unlocked 53 45 -8 __ns_name_pack 859 851 -8 vswscanf 184 144 -40 vdprintf 231 187 -44 vsscanf 210 151 -59 vswprintf 269 201 -68 vsnprintf 249 181 -68 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/7 up/down: 141/-295) Total: -154 bytes Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-09sh: add back sh2 specific assembly for clone()Waldemar Brodkorb
In gcc 5.x there is a compile failure, for sh2 builds as shad no longer is accepted. Strange that it is working for 4.9.x. Add back old assembly code.
2015-12-07add definitions for O_PATHWaldemar Brodkorb
Only alpha, hppa and sparc need non-default value.
2015-12-06mips: fix definition.Steve Ellcey
glibc [BZ# 16922] * sysdeps/mips/sys/asm.h (INT_SUB): Fix definition. (LONG_SUB): Ditto. (PTR_SUB): Ditto. glibc commit 5057ad3b50 Signed-off-by: Steve Ellcey <sellcey@mips.com> Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2015-12-05good by niosWaldemar Brodkorb
Get rid of NIOS support. We try to support NIOSII.
2015-12-05good by e1Waldemar Brodkorb
It is marked as broken and it seems you can't get any hardware for that anymore.
2015-12-05good bye vaxWaldemar Brodkorb
I mailed with Jan-Benedict Glaw, it seems VAX on Linux is really a lot of work todo and uClibc support didn't work ever.
2015-12-05remove sh64 supportWaldemar Brodkorb
No real hardware available. The project for sh64 with sh5 seems dead since 10 years. Gcc will remove support for it soon.
2015-12-05remove __UCLIBC_ASM_GLOBAL_DIRECTIVE__Waldemar Brodkorb
.globl can be used for every architecture so remove the define. Sync with GNU C library.
2015-12-05remove __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__Waldemar Brodkorb
It's even no longer required for non-ported ppc64 architecture. Sync with GNU C library. This simplify the macros in include/libc-symbols.h.
2015-11-30bfin: fix clashing with newer gccWaldemar Brodkorb
See here for a discussion about the problem: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47779 Latest gcc/binutils git can generate a working uClibc-ng toolchain. Binaries tested on Arcturus uCBF54x board via chroot from original firmware.
2015-11-30bfin: use vfork.S againWaldemar Brodkorb
Actually revert 711ad9f92c1cf992c4a3d9f4f709bd692be7789c, as it breaks vfork() on real hardware. So the common implementation no longer works for bfin.
2015-11-13metag: add missing header fileWaldemar Brodkorb
When installing header files a warning is generated, because the header is mandatory.
2015-11-08fanotify: include needed Linux definitionsWaldemar Brodkorb
To support older Linux kernel f.e. 2.6.32.68 include all required definitions. Copied from musl libc fanotify.h. Reported by Thomas Petazzoni from Buildroot project.
2015-11-08add support for euidaccess/eaccess legacy functionsWaldemar Brodkorb
Implementation taken from musl libc project. Missing functions recognized by buildroot autobuilders with failing open-vm-tools.
2015-11-03h8300: fix compile with 4.2.x kernelWaldemar Brodkorb
2015-10-22NPTL/ARCv2: Implement full memory barrier for NPTLVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-10-22alpha: add special umount2 handlingWaldemar Brodkorb
Only on Linux alpha __NR_oldumount is defined and a umount not umount2 syscall, but with two parameter is used. Add special handling for it and an alias for umount2() users. There was a discussion about this special handling, but it seems it was never committed upstream: http://marc.info/?l=linux-alpha&m=137455037930738&w=2 Runtime tested with qemu-alpha and a statically linked busybox binary.
2015-10-22alpha: fix kernel_stat structWaldemar Brodkorb
2015-10-22alpha: fix header nameWaldemar Brodkorb
2015-10-19lm32: add new architectureWaldemar Brodkorb
Add support for FPGA systems from Lattice Semiconductor http://www.latticesemi.com Merge https://github.com/m-labs/uclibc-lm32.git
2015-10-19mips: sync header with glibcWaldemar Brodkorb
Fixes following compile error, when UCLIBC_HAS_CONTEXT_FUNCS is enabled on a mips64 build: CC libc/sysdeps/linux/common/_exit.os libc/sysdeps/linux/mips/swapcontext.S: Assembler messages: libc/sysdeps/linux/mips/swapcontext.S:110: Error: Illegal operands `s.d fs6,(30*8+296)($4)' libc/sysdeps/linux/mips/swapcontext.S:111: Error: Illegal operands `s.d fs7,(31*8+296)($4)' libc/sysdeps/linux/mips/swapcontext.S:149: Error: Illegal operands `l.d fs6,(30*8+296)($2)' libc/sysdeps/linux/mips/swapcontext.S:150: Error: Illegal operands `l.d fs7,(31*8+296)($2)' Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>