summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-26test: sync tst-atfork2 with GNU libcWaldemar Brodkorb
2016-09-26linuxthreads: use tkill syscall for raiseWaldemar Brodkorb
Seems better and more stable.
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-26remove dead code and documentationWaldemar Brodkorb
The code was disabled a while ago in commit: 814b0901f460a246315bfa7933a661f415bdc7fa Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-09-25sync header with glibcWaldemar Brodkorb
Fixes a compile error for samba 4.5.0. Reported-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
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-19linuxthreads: Fix up pthread.h for XPG7.Leonid Lisovskiy
[ glibc commit d3c7e68655 ] Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-09-19test: disable regex testsWaldemar Brodkorb
The time to run the tests is very high and always subtests are failing. We need to fix the subtests and see how to reduce the time the test is running. At the moment it blocks my regression testing to much.
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-27ARC: Fix max ULP for cosine testEugeniy Paltsev
Max ULP for "cos (M_PI_6l * 2.0) == 0.5" in "test-double" sub-test is set to "0" for ARC. It causes "test-double" test failure. I realized that this sub-test on ARM gets completely same results. But it doesn't fails on ARM because max ULP is set to "1" for ARM. I am wondering, if it was done for any special reason? Otherwise, set max ULP for "cos (M_PI_6l * 2.0) == 0.5" test to "1" instead of "0" for ARC. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2016-08-25mips: add NaN supportWaldemar Brodkorb
2016-08-23delete dead code, use -Wdeclaration-after-statement by defaultWaldemar Brodkorb
Add -Wdeclaration-after-statement when EXTRA_WARNINGS is enabled.
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-16linuxthreads: install libpthread_nonshared.aWaldemar Brodkorb
This is useful to build native gcc on targets supporting Linuxthreads instead of NPTL.
2016-08-10librt: fix path parsing in __spawni()Eric Le Bihan
__spawni() loops forever when parsing the path variable due to incorrect pointer update. This patch fixes the issue. Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
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-01bump for releasev1.0.17Waldemar Brodkorb
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-31fix minor portability issue, use printfWaldemar Brodkorb
2016-07-31include missing Linux extension headers for poll.hWaldemar Brodkorb
This was found by Buildroot autobuilders for m68k.
2016-07-31ARC: Update relocation syntax for old-thread model codeAndrew Burgess
This commit reverses a change introduced in commit 20554a78a9bba that split some of the ARC code into two based on whether uClibc was configured with native threads or not. The native thread code was updated to use the relocation syntax of modern binutils, while the non-native code path used a syntax only accepted in older versions of binutils. The problem with this is that the choice of old binutils or not is orthogonal to the choice of native threads or not, and so, inevitably a user with a recent version of binutils can make the choice to configure uClibc with non-native thread support, and run into code that will not assemble. The solution is either to abandon support for the old tools completely, or to add a new compile time flag for ARC that is set when the version of binutils being used is old; this new flag would allow the old relocation structure to be selected. In this commit I have simply dropped support for older versions of the tools.
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-31ARC: Support R_ARC_JMP_SLOT relocations during bootstrapAndrew Burgess
This commit adds support for R_ARC_JMP_SLOT relocations during the bootstrap phase of the dynamic linker. These relocations will be generated if uClibc-ng is configured with 'DODEBUG=y'.
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-31test: reorganize tls macros in separate architecture filesWaldemar Brodkorb
To be more consistent separate all TLS macros in separate files and remove obsolete macros for not supported architectures. 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.
2016-07-17x86_64: remove dead code, SHARED is not defined when compilingWaldemar Brodkorb
2016-07-17cleanup PTR_MANGLE/PTR_DEMANGLE supportWaldemar Brodkorb
As this is only implemented for a few architecture and not well tested, just remove it. Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
2016-07-17mips: add regdef.h glibc compatibility headerWaldemar Brodkorb
2016-07-10x86_64: use C implementation for pthread_cond_wait/pthread_cond_timedwaitWaldemar Brodkorb
Add test case for the deadlock detection. Reported-By: Martin Willi <martin@strongswan.org>
2016-07-10x86_64: refresh ULPsWaldemar Brodkorb
2016-07-07The file list is at the beginning nowMartin Thomas
Signed-off-by: Martin Thomas <mtdev@hamtam.de>
2016-07-06bfin: allow to build lddWaldemar Brodkorb
2016-07-03arm: cleanup redundant macros for syscallsWaldemar Brodkorb
In uClibc-ng the syscall macros are in bits/syscalls.h.
2016-07-03bump for releasev1.0.16Waldemar Brodkorb
2016-06-30Add nds32 maintainersWaldemar Brodkorb
2016-06-30nds32: add support for new architectureWaldemar Brodkorb
Add support for Andes Technology NDS32 architecture. See here http://www.andestech.com/en/index/index.htm for more informaton. Verification of the port from an older uClibc port was done on a sponsored AG101p board. The testsuite only has 5 errors, three are related to an existing bug in dlclose() with LT.old, also happening on cris32 and m68k. Failures to fallocate/posix_fallocate are unresolved. Thanks to Andes Technology sponsoring the hardware and being very helpful while doing the uClibc-ng porting. Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
2016-06-25bits/sigset.h: Fix _EXTERN_INLINE redefinitionLeonid Lisovskiy
Commit 251a3c19cb "sleep: employ __USE_EXTERN_INLINES (with necessary fixes)" introduces following problems: 1. __USE_EXTERN_INLINES forcibly enabled build fails ... LD libuClibc-1.0.15.so libc/libc_so.a(cmsg_nxthdr.os): In function `__GI___cmsg_nxthdr': cmsg_nxthdr.c:(.text.__GI___cmsg_nxthdr+0x0): multiple definition of `__GI___cmsg_nxthdr' libc/libc_so.a(close.os):close.c:(.text.__GI___cmsg_nxthdr+0x0): first defined here libc/libc_so.a(creat.os): In function `__GI___cmsg_nxthdr': creat.c:(.text.__GI___cmsg_nxthdr+0x0): multiple definition of `__GI___cmsg_nxthdr' libc/libc_so.a(close.os):close.c:(.text.__GI___cmsg_nxthdr+0x0): first defined here ... 2. libuargp wrongly contains __cmsg_nxthdr/__sigismember/__sigdelset/__sigaddset global symbols on platforms which includes signal.h from sys/procfs.h As result, static linking will fail: TEST_LINK argp/ bug-argp1 /home/wbx/ppc-static/target_qemu-ppc-macppc_uclibc-ng_hard/usr/lib/libc.a(sigsetops.os): In function `__GI___sigismember': sigsetops.c:(.text+0x0): multiple definition of `__sigismember' /home/wbx/ppc-static/target_qemu-ppc-macppc_uclibc-ng_hard/usr/lib/libuargp.a(argp-xinl.os):argp-xinl.c:(.text+0x0): first defined here /home/wbx/ppc-static/target_qemu-ppc-macppc_uclibc-ng_hard/usr/lib/libc.a(sigsetops.os): In function `__GI___sigaddset': sigsetops.c:(.text+0x28): multiple definition of `__sigaddset' /home/wbx/ppc-static/target_qemu-ppc-macppc_uclibc-ng_hard/usr/lib/libuargp.a(argp-xinl.os):argp-xinl.c:(.text+0x28): first defined here /home/wbx/ppc-static/target_qemu-ppc-macppc_uclibc-ng_hard/usr/lib/libc.a(sigsetops.os): In function `__GI___sigdelset': sigsetops.c:(.text+0x4c): multiple definition of `__sigdelset' /home/wbx/ppc-static/target_qemu-ppc-macppc_uclibc-ng_hard/usr/lib/libuargp.a(argp-xinl.os):argp-xinl.c:(.text+0x4c): first defined here We have to partially revert 251a3c19cb to fix problems above. It is safe to do this after commit 162cfaea20 *: inline constant __sig{add,del}set and __sigismember since we are able to use new inlines from within libc and leave the rest of world(__USE_EXTERN_INLINES) equal to glibc now. Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
2016-06-24inet/resolv: Try search domains first for unqualified namesIngo van Lil
When resolving an unqualified host name, the resolver tries the original name first before appending the domains from the search list. If a TLD with the same name exists, the query will succeed (but yield no A record) and the resolver will return HOST_NOT_FOUND without trying the search domains. This patch changes the lookup order for unqualified host names (without dots) to try the search domains first and the original name last. Signed-off-by: Ingo van Lil <inguin@gmx.de>
2016-06-23ARC: Enable shared crt1Vineet Gupta
Currently crt1 takes address of functions (main,_init,_fini) directly which doesn't generate truely position independent code, but zero based values instead. e.g. | __start: | ... | add_s r2,sp,0x4 | mov_s r0, main generates to | 000156ec <__start>: | ... | 156f4: add_s r2,sp,0x4 | 156f6: mov_s r0,0x15f7c | ... | 00015f7c <main>: | 15f7c: push_s blink This works just fine for the normal (non PIE) dynamic executables since they are loaded at address 0. However this is not true for PIE executables. So for Scrt1 we use a true position independent way when taking function addresses. Cc: uclibc@uclibc.org <uclibc@uclibc.org> Cc: devel@uclibc-ng.org <devel@uclibc-ng.org> Cc: Cupertino Miranda <cmiranda@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-06-23libs: install backward compatibility symlinksAlexey Brodkin
Simplify the switch from uClibc to uClibc-ng. Apps already built against uClibc-0.9.x.y require .so.0 libs to present on target which in case of current uClibc-ng is not the case and those apps could not be run. This change creates symlinks from .so.1 to .so.0 for most of other libs in the same way as it was done by 23e96d89b6ab "ldso: install backward compatibility symlink by default" Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Waldemar Brodkorb <wbx@uclibc-ng.org> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Anton Kolesov <akolesov@synopsys.com>
2016-06-23ARC: remove deprecated -msoft-float from CFLAGSAlexey Brodkin
"-msoft-float" makes no sense for ARC because there's no such thing as "-mhard-float" on ARC. Instead we use our own "-mfpu=XXX" option when a particular floating-point related HW feature is enabled in the ARC core. We used to live with that phony option for quite some time but with migration to newer GCC following warning now appears: -------------------->8----------------- arc-linux-gcc: warning: ‘-msoft-float’ is deprecated cc1: warning: ‘-msoft-float’ is deprecated [enabled by default] -------------------->8----------------- And that warning gets printed for each invocation of gcc with the option in question, which makes compilation output barely readable. So we disable that phony option for ARC now. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Waldemar Brodkorb <wbx@uclibc-ng.org> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Anton Kolesov <akolesov@synopsys.com>
2016-06-23ARC: Implement .note.ABI-tag section in crt1.SAnton Kolesov
Linux Standard Base specifies section .note.ABI-tag that can be considered as a marker for ELF files targeted to Linux systems. See https://refspecs.linuxfoundation.org/LSB_1.2.0/gLSB/noteabitag.html This section, for example, is used by the GDB to identify Linux ELFs as compared to baremetal ELFs that do not have this section. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com> Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com>
2016-06-22ldso: fix dlsym hang when reloading DSOsLeonid Lisovskiy
It can happen under certain cases that the DSO had refcount 0, but was already loaded. (NODELETE flag is set, or it is pulled in via both NEEDED dependency and explicit dlopen()). Add extra reference count for NODELETE objects, this will ensure that the reference count never drops below one. It is improved version of http://lists.busybox.net/pipermail/uclibc/2013-June/047826.html Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>