summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-22libiconv: remove function, which is not available w/o libiconv a4 macrosWaldemar Brodkorb
2018-04-17libdl: fix problem with unmappingWaldemar Brodkorb
The munmap was still called with broken length, as sometimes start was empty. This finally solves segfaults when running php -m with ldap module activated.
2018-04-17libdl: better checking and logging for ctors/dtorsWaldemar Brodkorb
2018-04-17libdl: remove dead codeWaldemar Brodkorb
2018-04-17libdl: remove LDSO_NO_CLEANUPWaldemar Brodkorb
2018-04-17libdl: cleanup old inline changelogWaldemar Brodkorb
2018-04-17Revert "libdl: fix dlclose() issue"Waldemar Brodkorb
This reverts commit bf4c2d242f587700e3eb2ffd5721ddaf3cdbc7e5.
2018-04-17common/sendfile.c: bugfix can't support offset is NULLGuo Ren
In ltp testcase sendfile08.c, it use offset=NULL to test the api. PATCH V2: fixup the stupid missing check in the end. Sorry for lose test. See "man sendfile" and it really support offset is NULL. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2018-04-17Revert "common/sendfile.c: bugfix can't support offset is NULL"Waldemar Brodkorb
This reverts commit b00fd230ed0b49b9f23d829ad5d09859f34bb754.
2018-04-13lseek.c: bugfix ltp lseek01.cGuo Ren
Ref the implement from the glibc and high=0 seems so bad. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2018-04-13common/sendfile.c: bugfix can't support offset is NULLGuo Ren
In ltp testcase sendfile08.c, it use offset=NULL to test the api. See "man sendfile" and it really support offset is NULL. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2018-04-13or1k: add F_{DUPFD_CLOEXEC, SETPIPE_SZ, GETPIPE_SZ}Thomas Petazzoni
Those definitions exist on all other architectures, but were not present in or1k specific headers when or1k support was merged. On the kernel side, their support is completely architecture independent, so we just need those definitions to make those fcntl() calls available on or1k. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-02use __NR_newfstatat only for modern Linux architecturesWaldemar Brodkorb
Otherwise it breaks mips64 n64. Should be used for aarch64/tilegx only.
2018-03-22hppa: fix runtime issuesWaldemar Brodkorb
Sync clone()/vfork() with GNU C Library. Allow CFI and fix strsignal() / tcsetattr().
2018-03-15csky: support bsd-setjmp and bsd-_setjmp.Guo Ren
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2018-03-15libdl: fix dlclose() issueWaldemar Brodkorb
There is a patch included in https://bugs.busybox.net/show_bug.cgi?id=6158 from 2013, which was never applied. This really fixes the php -m segfaults.
2018-03-14Revert "Revert "libdl: fix size parameter when unmap library in dlclose""Waldemar Brodkorb
This reverts commit 952bb00f0b2eb576b0bf48c4f87018429a42e28d. And adds this fix for 64 Bit systems. http://lists.busybox.net/pipermail/uclibc/2014-December/048737.html
2018-03-12tile: add basic support for tilegxWaldemar Brodkorb
This adds basic support for tile architecture. Only static binaries, no ld.so or threading support. Tested with qemu-tilegx only.
2018-03-09sparc32: Add nop before __startcontext to stop unwindingWaldemar Brodkorb
From glibc commit 9aa5c222b9e0409143410a02b6364a3b25dbf028 [BZ #22919]
2018-03-05utils: fix compile of msgfmt/msgmergeWaldemar Brodkorb
The host utils are missing the dependencies, the target utils need libiconv enabled.
2018-03-04fenv: only allow for ppc e500Waldemar Brodkorb
2018-03-03bump for release 1.0.29v1.0.29Waldemar Brodkorb
2018-03-01add missing include to quieten compilerWaldemar Brodkorb
2018-03-01quieten some warnings when EXTRA_WARNINGS not setWaldemar Brodkorb
2018-03-01fix issue with LDSO_GNU_HASH_SUPPORTWaldemar Brodkorb
Under Fedora 27 there is a problem with the existing ld check. Binutils ld segfaults. Add a glibc compat macro to complete the build on Fedora. Signed-off-by: Sven Anders <anders@anduras.de>
2018-02-26stat.h: fix issue with aarch64Waldemar Brodkorb
2018-02-18utils: fix install errorWaldemar Brodkorb
Regression introduced with 748b5e3d2d70e47ab72ed44a371bd0db9a3a0c20
2018-02-17bits/socket.h: add missing definesWaldemar Brodkorb
Newer iproute2 package make use of some of defines. Sync missing defines with GNU C library.
2018-02-17libm: fix compile errorWaldemar Brodkorb
Fix a compile error when __UCLIBC_SUSV3_LEGACY__ is disabled. Reported-by: Paolo Mantegazza <paolo.mantegazza@polimi.it>
2018-02-17add gettext-tiny toolsWaldemar Brodkorb
For libintl stub users tiny gettext tools might be useful. Tested with x86_64 on Gentoo/uClibc-ng system.
2018-02-12uClibc-ng does not implement name_to_handle_atAlexey Neyman
... so don't declare it. Otherwise, eudev finds it declared and tries to link with it - and fails. Signed-off-by: Alexey Neyman <stilor@att.net>
2018-02-04mman: disable memfd_create declarationWaldemar Brodkorb
2018-02-03csky: bugfix ltp open12 failed.Guo Ren
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2018-02-03add libc version compatibilityWaldemar Brodkorb
2018-02-03bits/mman.h: consolidate header fileWaldemar Brodkorb
Sync with GNU C library and consolidate duplicate non architecture specific defines. MAP_UNINITIALIZED is only defined to 0x4000000 and used by the Linux kernel when CONFIG_MMAP_ALLOW_UNINITIALIZED is enabled. CONFIG_MMAP_ALLOW_UNINITIALIZED is only available for nommu. See Documentation/nommu-mmap.txt.
2018-01-31malloc: add glibc compat symbolsWaldemar Brodkorb
2018-01-31malloc: add malloc_usable_size()Waldemar Brodkorb
2018-01-31remove arc4random (rc4 based)Waldemar Brodkorb
OpenBSD arc4random is using chacha20 cipher algorithm for a long time. This copy is still based on deprecated rc4 cipher algorithm. We could either update the arc4random.c or drop it. Drop it. Users should better use libbsd when using arc4random interface. Musl/glibc does not have arc4random either.
2018-01-31aarch64/sys/ucontext.h: include bits/sigcontext.hBernd Kuhls
Fixes a buildroot build error with ffmpeg In file included from /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/signal.h:329:0, from fftools/ffmpeg.h:26, from fftools/ffmpeg_opt.c:23: /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/sys/ucontext.h:52:16: error: field 'uc_mcontext' has incomplete type mcontext_t uc_mcontext; ^~~~~~~~~~~ using this defconfig: BR2_aarch64=y BR2_PACKAGE_FFMPEG=y sys/ucontext.h for other archs already include bits/sigcontext.h, on aarch64 this is needed as well. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
2018-01-31libiconv: fake EUC_JP supportWaldemar Brodkorb
A lot of packages use the same autoconf macro, fake EUC_JP to succeed. Tested with wget,libcdio and gnupg.
2018-01-21bump version to 1.0.28v1.0.28Waldemar Brodkorb
2018-01-21supress some gcc warningsWaldemar Brodkorb
2018-01-21xtensa: fix R_XTENSA_TLSDESC_ARG handling in _dl_do_relocMax Filippov
R_XTENSA_TLSDESC_ARG is a true RELA relocation, the addend is in the relocation record itself, not in place. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2018-01-21xtensa: fix _dl_tlsdesc_dynamicMax Filippov
There are multiple errors in _dl_tlsdesc_dynamic: - the reference C implementation should return pointer to the thread-local variable, not offset from the thread pointer, because the xtensa ABI expects TLSDESC_FN to return pointer to the TLS variable; - addx8 used for indexing into dtv has its second and third registers in wrong order, the index must be multiplied by 8, not the base; - the same addx8 uses wrong base: instead of dtv it adds the offset to the threadptr; - the return value in the fast path is calculated as td->tlsinfo.ti_offset - __builtin_thread_pointer, not what was intended; - both fast and slow paths should not subtract __builtin_thread_pointer from the result. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2018-01-21simplify and fix getcwdWaldemar Brodkorb
The fallback code is not used as all supported kernels have the syscall. Check if a absolute path is returned from syscall.
2018-01-20include/elf.h: sync with GNU C libraryWaldemar Brodkorb
Add NT_GNU_BUILD_ID and other defines to allow applications using it to successfully compile. (f.e. firefox)
2018-01-15xtensa: fix strcmpMax Filippov
Loops with 'loop forever' annotation inside strcmp are actually meant to loop forever. Falling through the end of the first loop may result in equal strings being compared unequal, e.g.: #include <string.h> int main(void) { char a[4096] __attribute__((aligned(4))); char b[4096] __attribute__((aligned(4))); memset(a, ' ', 258 * 8); memset(b, ' ', 258 * 8); a[255 * 8] = 0; a[256 * 8] = 'a'; b[255 * 8] = 0; b[256 * 8] = 'b'; return !(strcmp(a, b) == 0); } Falling through the end of the second loop may result in unequal strings being compared as equal, e.g.: #include <string.h> int main(void) { char a[4096] __attribute__((aligned(4))); char b[4096] __attribute__((aligned(4))); memset(a, ' ', 514 * 6); memset(b, ' ', 514 * 6); a[514 * 6 + 0] = 'a'; a[514 * 6 + 1] = 0; b[514 * 6 + 0] = 'b'; b[514 * 6 + 1] = 0; return !(strcmp(a, b) != 0); } Use 0 as a loop counter to make 2^32 - 1 iterations which is enough to cover all addressable memory. While at it drop useless nop at the end of the first loop and use a11 for all loop counters. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2018-01-15libpthread/nptl: bugfix malloc segfault in race conditions.Guo Ren
In libc/sysdeps/linux/common/bits/uClibc_pthread.h: extern void weak_function _pthread_cleanup_push_defer(...) This *weak_function* declaration will cause nptl/cleanup_defer_compat.c: strong_alias (...) !!!FAIL!!!, because it include pthreadP.h->pthread.h ->uClibc_pthread.h That means: Readelf -s libpthread/nptl/cleanup_defer_compat.o you will get: 18: 00000000 198 FUNC WEAK DEFAULT 1 _pthread_cleanup_push_def Readelf -s libc/misc/internals/__uClibc_main.o you will also get: 32: 00000038 58 FUNC WEAK DEFAULT 1 _pthread_cleanup_push_def Final: gcc malloc_pthread_test.c -lpthread The libc/stdlib/malloc-standard/malloc.c:839 (__MALLOC_LOCK-> _pthread_cleanup_push_def) will use the one in __uClibc_main.o !!!not in cleanup_defer_compat.o!!!, becasue two cleanup_defer_compat in libc.a with the same weak declarations and the __uClibc_main.o is close to front. ==== All of malloc/free will failed in muti-threads' race conditions probabilistic. As it happens, uClibc-0.9.33.2 is OK, Becasue: It's seperated in libpthread.a and libc.a, and the libc.a is the last lib for ld internal-cmd, and malloc will get right cleanup_defer_compat from libpthread.a. This BUG is from 2016-09-24 to now: >>> commit 29ff9055c80efe77a7130767a9fcb3ab8c67e8ce Author: Waldemar Brodkorb <wbx@uclibc-ng.org> Date: Sat Sep 24 02:55:31 2016 +0200 use a single libc and deduplicate threading code 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 <<< Perharps we need carefully check all of the impact about that commit. Signed-off-by: Guo Ren <ren_guo@c-sky.com>
2018-01-15rt: cleanup and allow to build for linuxthreadsWaldemar Brodkorb
It seems there is no real dependency to NPTL for these clock_* functions when UCLIBC_ADVANCED_REALTIME is enabled. No regressions found. Reported-by: Baruch Siach <baruch@tkos.co.il>
2018-01-15nptl: use generic lowlevellock.h for most architecturesWaldemar Brodkorb
Only mips/x86/x86_64 needs a special version of lowlevellock.h. No regressions found.