summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2016-12-20add stub implementation for libintl/gettextWaldemar Brodkorb
These adds the stubs from gettext-tiny 0.0.5 from here: https://github.com/sabotage-linux/gettext-tiny
2016-12-14add libiconv-tiny implementationWaldemar Brodkorb
To use it enable UCLIBC_HAS_LIBICONV, then iconv_open/iconv_close should be available.
2016-12-10threads: optimize single threaded applicationsWaldemar Brodkorb
Revert the removal of the weak pthread functions and guarantee a link order so that single threaded applications doesn't link in all the pthread functions they don't use. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Tested-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-12-10libc/sysdeps/linux/common/madvise.c: disable on noMMU architecturesThomas Petazzoni
Similar to what was done in commit 9945c6d21797553e78cbef8034f6dd16b3824df5 for posix_madvise(). Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-03fix obstack compile issue after libintl/gettext removalWaldemar Brodkorb
2016-12-02nds32: in latest gcc from Andes, this got renamedWaldemar Brodkorb
2016-12-02remove libintl stub and libintl.h headerWaldemar Brodkorb
As __UCLIBC_HAS_GETTEXT_AWARENESS__ is never defined, this is mostly dead code. It is planned to integrate libiconv-tiny and gettext-tiny into uClibc-ng after the next release, so that more software packages can be used without modification. Remove any _/_N macro usage.
2016-11-29remove libresolv stubWaldemar Brodkorb
2016-11-28posix_madvise not available for noMMUWaldemar Brodkorb
2016-11-27remove UCLIBC_HAS_LFSWaldemar Brodkorb
2016-11-27remove libnsl stubWaldemar Brodkorb
2016-11-27do not define madvise related macros for noMMU targetsWaldemar Brodkorb
2016-11-27fixup gcc warningsWaldemar Brodkorb
Remove following warning from common code: warning: ISO C90 forbids mixed declarations and code
2016-11-27microblaze: sync sysdep-cancel.h/sydep.h with GNU libcWaldemar Brodkorb
2016-11-27add aligned_alloc required for latest gcc libstdc++Waldemar Brodkorb
2016-11-27Fix handling of unterminated [ expression in fnmatch.Waldemar Brodkorb
Originally fixed in GNU libc by: commit 794c3ad3a405697e2663b00f616e319383b9bb7d Author: Ulrich Drepper <drepper@gmail.com> Date: Fri Jan 14 08:06:22 2011 -0500 Reported-by: Denys Vlasenko <vda.linux@googlemail.com> via busybox mailinglist.
2016-11-27arm: use common ret_ERRVALWaldemar Brodkorb
Fixes mq_send return value and errno issue. Reported-by: Frank Liu <fliu@universalbiosensors.com> Tested-by: Frank Liu <fliu@universalbiosensors.com>
2016-11-27mips: fix SIGILL problem with mips ISA r6Waldemar Brodkorb
2016-11-17revert 9b1077dc70e52ee85a718bce3fcfec7ae9af2967 partiallyWaldemar Brodkorb
2016-11-13NPTL/ARC: provide a kernel assisted atomic cmpxchgVineet Gupta
For hardware configurations lacking LLOCK/SCOND (say ARC750), use a syscall to atomically do the cmpxchg. This is costly and painful, but really the only way out. Note that kenrel only guarantees this to work in a UP configuraion Reported-by: Avinash Patil <avinashp@quantenna.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-11-13NPTL/ARC: implement __arch_exchange_32_acq using native EXVineet Gupta
ARC EX instruction maps directly to this primitive, thus helps elide the llock/scond based retry loop where possible. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-11-13ARC: string: handle gcc 6.x macro changesVineet Gupta
In gcc 6.x cleanup, the macros got renamed. (Need to support the old toggle for some more time) Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-11-10nptl: add pthread_getname_np/pthread_setname_np from GNU libcWaldemar Brodkorb
These functions are used by firefox for example. Tested with running firefox on x86 system.
2016-11-04nios2: sync support with glibcWaldemar Brodkorb
Only static linking is supported for now. More debugging and analyzing for ld.so, TLS and NPTL is required. But at least you can bootup a static root fileystem in Qemu.
2016-11-03microblaze: add NPTL/TLS support from GNU libcWaldemar Brodkorb
Not perfect, but a starting point. Some tests of the test suite are failing.
2016-10-31microblaze: use assembly version of clone, fix vforkWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-10-20Fix nftw when called with FTW_CHDIR and FTW_DEPTHJohn Ata
Change directory back to the parent before processing the directory (after the contents have already been processed). Signed-off-by: John Ata <john.ata@baesystems.com>
2016-10-19ARC: update .note.ABI-tag for ABIv4Vineet Gupta
Cc: Anton Kolesov <akolesov@synopsys.com> Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-10-19create empty static files conditionallyWaldemar Brodkorb
2016-10-08ppc: do not include copysgnl.c if UCLIBC_HAS_LONG_DOUBLE_MATH enabledWaldemar Brodkorb
Fixes compilation of uClibc-ng when UCLIBC_HAS_LONG_DOUBLE_MATH is used.
2016-10-08cleanup libc.aWaldemar Brodkorb
The nested libpthread_nonshared.a and libdl.os shouldn't be included in the static libc.a. Fixes compile issues for static builds.
2016-10-05cleanup ppc portWaldemar Brodkorb
Remove powerpc64 bits as we only support powerpc32.
2016-09-30remove linux kernel 2.4 modules supportWaldemar Brodkorb
2016-09-26locale: cleanup supportWaldemar Brodkorb
Enable locale application to be build when utils are build. Remove useless compile and link warnings. Default to minimal locale builds. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-09-26use a single libc and deduplicate threading codeWaldemar Brodkorb
Similar to musl libc a single libc has many benefits and solves some open issues with uClibc-ng. - no pthread_mutex_* weak symbols exported anymore - applications no longer failing to link when either -lrt or -lpthread are missing for dynamic and static linking mode - smaller C library - slightly better runtime performance
2016-09-26always assume tgkill is presentWaldemar Brodkorb
We do not support 2.4 Linux kernels anyway, and almost all newer 2.6 kernels should have tgkill syscall. Cleanup the raise situation, pt-raise.c is unused, sync raise.c with latest GNU libc. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-09-21microblaze: fixup headers to make gdb compile happyWaldemar Brodkorb
Add some definitions and fix some types to make gdb compile happy.
2016-09-19elf-{fdpic, dsbt}.h: avoid void pointer's subtractionRahul Bedarkar
elf-fdpic.h or elf-dsbt.h is included by link.h. When C++ program includes <link.h>, we get following build failure. ../usr/include/bits/elf-fdpic.h: In function 'void* __reloc_pointer(void*, const elf32_fdpic_loadmap*)': ../usr/include/bits/elf-fdpic.h:95: error: invalid use of 'void' void pointer addition and subtraction is not allowed in C++ as it has undetermined size, however in C with language extension it is possible because sizeof void is treated as one byte. Instead of performing subtraction on void pointers, typecast it to char* first. This build failure is detected by Buildroot autobuilder. http://autobuild.buildroot.net/results/a10/a10ed48e6eb8411a3d8372f57c05fd11130da0e0/ Signed-off-by: Rahul Bedarkar <rahul.bedarkar@imgtec.com>
2016-08-27remove DOMULTI supportWaldemar Brodkorb
A single test with targeting ARM showed that this feature seems bit rotted. Remove DOMULTI and simplify Makefiles.
2016-08-17ARC: Support syscall ABI v4Vineet Gupta
The syscall ABI includes the gcc functional calling ABI since a syscall implies userland caller and kernel callee. The current gcc ABI (v3) for ARCv2 ISA required 64-bit data be passed in even-odd register pairs, (potentially punching reg holes when passing such values as args). This was partly driven by the fact that the double-word LDD/STD instructions in ARCv2 expect the register alignment and thus gcc forcing this avoids extra MOV at the cost of a few unused register (which we have plenty anyways). This however was rejected as part of upstreaming gcc port to HS. So the new ABI v4 doesn't enforce the even-odd reg restriction. Do note that for ARCompact ISA builds v3 and v4 are practically the same in terms of gcc code generation. This change is dormant for now (gcc 4.8.x based tools) and will only kick in with switch to gcc 6.x based tools. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-08-08arm: fix compile in thumb modeWaldemar Brodkorb
Fix a regression introduced by commit 0550ecce0e6580c5ad34e9a9a39ff18ccf8774f9 Reported by Buildroot developers. Embedded test must be extented to ARMv7 thumb2 builds to find such regressions next time. It wasn't triggered by a cortex-m4 ARM noMMU build.
2016-08-05sunrpc: Do not use alloca in clntudp_callWaldemar Brodkorb
CVE-2016-4429: The call is technically in a loop, and under certain circumstances (which are quite difficult to reproduce in a test case), alloca can be invoked repeatedly during a single call to clntudp_call. As a result, the available stack space can be exhausted (even though individual alloca sizes are bounded implicitly by what can fit into a UDP packet, as a side effect of the earlier successful send operation). From GNU libc: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=bc779a1a5b3035133024b21e2f339fe4219fb11c
2016-08-01arc: crt1: Fix to PIECupertino Miranda
crt1.S needed to use a got relative reference. Libraries like pthreads define a _init and unless it is GOT, the linker will fail because it will try to create a dynamic reloc on .text section, more precisely on __start. Signed-off-by: Cupertino Miranda <cmiranda@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Vlad Zakharov <vzakhar@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com>
2016-07-31include missing Linux extension headers for poll.hWaldemar Brodkorb
This was found by Buildroot autobuilders for m68k.
2016-07-31arc: clone: Simplify CLONE_THREAD detectionAlexey Brodkin
This change was inspired by similar change in glibc: https://sourceware.org/git/?p=glibc.git;a=commit;h=0cb313f7cb0e418b3d56f3a2ac69790522ab825d Current Linux kernel requires CLONE_VM to be set with CLONE_THREAD otherwise returning -EINVAL, see man clone2. This means we don't need to check for both CLONE_THREAD and CLONE_VM instead we may simplify code a lot and just check 1 bit (CLONE_THREAD). Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Vineet Gupta <vgupta@synopsys.com>
2016-07-31arc: clone: Fix CLONE_THREAD detectionAlexey Brodkin
For thread group case (CLONE_THREAD), the cached PID of new process/thread need not be reset. The old logic to decide that was flawed as it would be true only for exact combination of CLONE_THREAD + _VM, but would fail for CLONE_THREAD + _VM + _xyz. More detailed tear-down of current and new code below. Current implementation is: --------------------->8-------------------- ; r12 contains clone flags mov_s r2, CLONE_THREAD_N_VM; r2 contains bit mask and_s r2, r2, r12 ; r2 contains bit mask AND clone flags ; but r12 still contains the same flags brne r2, r12, .Lgo_thread ; here we compare modified mask with ; flags as they were and skip pthread TID/PID ; setup if r2 != r12 which happens all ; the time except clone flags were ; exactly CLONE_THREAD | CLONE_VM --------------------->8-------------------- New implementation is: --------------------->8-------------------- ; r12 contains clone flags mov_s r2, CLONE_THREAD_N_VM; r2 contains bit mask and_s r12, r12, r2 ; r12 contains clone flags AND bit mask ; i.e. we did mask all flags except ; CLONE_THREAD and CLONE_VM breq r2, r12, .Lgo_thread ; here we compare masked flags with ; target mask and if they match we skip ; pthread TID/PID setup --------------------->8-------------------- Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Vineet Gupta <vgupta@synopsys.com>
2016-07-31arc: clone: Recover PID correctlyAlexey Brodkin
Caught by tst-getpid1 test from uClibc's test-suite. It looks like original implementation was not correct. The code in question is supposed to recover PID of the new thread. And by no means that could happen with clone() syscall while getpid() does exactly this. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Reported-by: Eugeniy Paltsev <paltsev@synopsys.com>
2016-07-31remove unused code, RTLD_PRIVATE_ERRNO is never definedWaldemar Brodkorb
2016-07-31deduplicate jmpbuf-unwind.hWaldemar Brodkorb
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
2016-07-17cleanup CALL_MCOUNT / PROFWaldemar Brodkorb
As this is only implemented for a few architecture and not well tested, just remove it.