Age | Commit message (Collapse) | Author |
|
This reverts commit bf4c2d242f587700e3eb2ffd5721ddaf3cdbc7e5.
|
|
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>
|
|
This reverts commit b00fd230ed0b49b9f23d829ad5d09859f34bb754.
|
|
Ref the implement from the glibc and high=0 seems so bad.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
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>
|
|
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>
|
|
Otherwise it breaks mips64 n64.
Should be used for aarch64/tilegx only.
|
|
Sync clone()/vfork() with GNU C Library.
Allow CFI and fix strsignal() / tcsetattr().
|
|
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
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.
|
|
This reverts commit 952bb00f0b2eb576b0bf48c4f87018429a42e28d.
And adds this fix for 64 Bit systems.
http://lists.busybox.net/pipermail/uclibc/2014-December/048737.html
|
|
This adds basic support for tile architecture.
Only static binaries, no ld.so or threading support.
Tested with qemu-tilegx only.
|
|
From glibc commit 9aa5c222b9e0409143410a02b6364a3b25dbf028
[BZ #22919]
|
|
The host utils are missing the dependencies, the target
utils need libiconv enabled.
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
Regression introduced with 748b5e3d2d70e47ab72ed44a371bd0db9a3a0c20
|
|
Newer iproute2 package make use of some of defines.
Sync missing defines with GNU C library.
|
|
Fix a compile error when __UCLIBC_SUSV3_LEGACY__ is disabled.
Reported-by: Paolo Mantegazza <paolo.mantegazza@polimi.it>
|
|
For libintl stub users tiny gettext tools might be useful.
Tested with x86_64 on Gentoo/uClibc-ng system.
|
|
... 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>
|
|
|
|
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
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>
|
|
A lot of packages use the same autoconf macro, fake EUC_JP to
succeed. Tested with wget,libcdio and gnupg.
|
|
|
|
|
|
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>
|
|
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>
|
|
The fallback code is not used as all supported kernels have the
syscall. Check if a absolute path is returned from syscall.
|
|
Add NT_GNU_BUILD_ID and other defines to allow applications
using it to successfully compile. (f.e. firefox)
|
|
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>
|
|
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>
|
|
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>
|
|
Only mips/x86/x86_64 needs a special version of lowlevellock.h.
No regressions found.
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Use __NR_sync_file_range2 for csky sync_file_range function.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
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.
|