Age | Commit message (Collapse) | Author |
|
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>
|
|
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.
|
|
Only alpha, hppa and sparc need non-default value.
|
|
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>
|
|
Get rid of NIOS support. We try to support NIOSII.
|
|
It is marked as broken and it seems you can't get
any hardware for that anymore.
|
|
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.
|
|
No real hardware available. The project for sh64 with sh5 seems
dead since 10 years. Gcc will remove support for it soon.
|
|
.globl can be used for every architecture so remove the define.
Sync with GNU C library.
|
|
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.
|
|
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.
|
|
Actually revert 711ad9f92c1cf992c4a3d9f4f709bd692be7789c, as
it breaks vfork() on real hardware. So the common
implementation no longer works for bfin.
|
|
When installing header files a warning is generated, because
the header is mandatory.
|
|
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.
|
|
Implementation taken from musl libc project.
Missing functions recognized by buildroot autobuilders
with failing open-vm-tools.
|
|
|
|
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
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.
|
|
|
|
|
|
Add support for FPGA systems from Lattice Semiconductor
http://www.latticesemi.com
Merge https://github.com/m-labs/uclibc-lm32.git
|
|
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>
|
|
Enable ia64 in the menu.
Fix build for architectures withou ld.so support.
Fix syntax error in bits/byteswap.h.
|
|
Add support for the syncfs() system call.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
|
|
Add support for fanotify_init() and fanotify_mark() syscalls. The header
file is taken from glibc.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
|
|
Information about Openrisc:
http://opencores.org/or1k/Main_Page
Integrated from:
https://github.com/openrisc/uClibc-or1k
|
|
Most changes are mechanical replacement of 'retw' instruction with
'abi_ret' macro, defined to 'retw' or 'ret' according to ABI.
Assembly code that makes calls is duplicated for call0 ABI with changed
register numbers for parameters/return value and call instruction.
'entry' instructions are replaced with 'abi_entry' macro.
More interesting changes:
- non-leaf assembly functions (e.g. _dl_tlsdesc_dynamic,
_dl_linux_resolve, SYSCALL_ERROR_HANDLER, PSEUDO) now need to preserve
registers around intermediate calls they make, use temporary stack
frame for that;
- setjmp/longjmp only need to save and restore return address, stack
pointer and callee-saved registers in the jmpbuf;
- __clone and syscall functions had hardcoded offsets to parameter
passed on stack, on call0 ABI they don't need stack frame, so the
offset is different. Replace these offsets with FRAMESIZE macro.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
posix_fallocate implementation in uClibc relies on fallocate
system call - it just returns what fallocate returns. However
fallocate returns -1 on failure and assigns an error number
to errno variable. In the same time posix_fallocate must
return an error number but not -1.
What does this patch: if fallocate returns -1 then posix_fallocate
returns errno. Otherwise posix_fallocate returns 0 on success.
However there is a side effect - posix_fallocate sets errno on
failure because fallocate does it. But POSIX does not forbid it
thus it's not a problem.
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
|
|
For common generic syscall ABI fallocate syscall handler in kernel
expects a 64-bit signed arguments for offset and len. However uClibc
has 2 wrappers for this syscall: fallocate and fallocate64.
On 32-bit machines fallocate (not fallocate64) expects 32-bit values of
offset and len. Thus in this case uClibc's fallocate must pass to the
syscall those values with sign extension. High word of 64-bit value must
be 0 or 0xFFFFFFFF depending on sign of the original 32-bit value (offset
or len). It is how sign extansion works - all high bits of the negative
value must be 1.
So on 32-bit machines uClibc's fallocate does sign extension incorrectly
when 32-bit values are passed (offset or len). It just fills the second
word of 64-bit value by zeros. E.g. fallocate works incorrectly when offset
or length is negative value - in this case kernel thinks that positive
values are passed.
Solution is to call fallocate64 from fallocate and pass 32-bit values of
offset and len to fallocate64. off_t type is automatically converted to
off64_t with an appropriate sign extension. Then fallocate64 invokes
kernel's system call properly.
This error is detected in LTP's test kernel/syscalls/fallocate02:
----------->8----------
fallocate(..., 1, -1024, 1024) failed, expected errno:22: TEST_ERRNO=0
fallocate(..., 1, 1024, -1024) failed, expected errno:22: TEST_ERRNO=0
fallocate(..., 1, 12288, -1024) failed, expected errno:22: TEST_ERRNO=0
fallocate(..., 1, -24576, 1024) failed, expected errno:22: TEST_ERRNO=0
----------->8----------
fallocate does not emit an error because negative values are passed to the
kernel without sign extension and kernel thinks that it got valid positive
values.
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
|
|
fallocate system call must return 0 on success. On error, -1 is returned
and errno is set to indicate the error.
However there is an error in fallocate which is fixed by this patch - it
does not set errno and returns invalid value on error (it returns error
code instead of -1).
This error is detected in LTP's test kernel/syscalls/fallocate02:
----------->8----------
fallocate(..., 1, 0, 1024) failed, expected errno:9: TEST_ERRNO=0
fallocate(..., 1, -1024, 1024) failed, expected errno:22: TEST_ERRNO=0
fallocate(..., 1, 1024, -1024) failed, expected errno:22: TEST_ERRNO=0
fallocate(..., 1, 12288, 0) failed, expected errno:22: TEST_ERRNO=0
fallocate(..., 1, 12288, -1024) failed, expected errno:22: TEST_ERRNO=0
fallocate(..., 1, -24576, 1024) failed, expected errno:22: TEST_ERRNO=0
----------->8----------
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
|
|
|
|
|
|
access to the jmp_buf structure occasionally happens asymmetrically:
fields defined in pointer size width (64 on N32) can be accessed as
32-bit words, but in that case, a̲l̲l̲ involved code must agree on that…
|
|
|
|
ret_ERRVAL is used by mq_timedsend and mq_timedreceive, it needs to be
defined to retw, otherwise error return from those functions segfaults.
This fixes the following testsuite failures:
.... tst-mqueue1
FAIL tst-mqueue1 got 1 expected 0
Didn't expect signal from child: got `Segmentation fault'
.... tst-mqueue2
FAIL tst-mqueue2 got 1 expected 0
Didn't expect signal from child: got `Segmentation fault'
.... tst-mqueue3
FAIL tst-mqueue3 got 1 expected 0
Didn't expect signal from child: got `Segmentation fault'
.... tst-mqueue4
FAIL tst-mqueue4 got 1 expected 0
Didn't expect signal from child: got `Segmentation fault'
.... tst-mqueue5
FAIL tst-mqueue5 got 1 expected 0
Didn't expect signal from child: got `Segmentation fault'
.... tst-mqueue6
FAIL tst-mqueue6 got 1 expected 0
Didn't expect signal from child: got `Segmentation fault'
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
Cancellable syscalls use call8 to call functions that enable/disable
cancellation, thus they cannot use the default FRAMESIZE.
Redefine FRAMESIZE for such syscalls.
This fixes the following testsuite failure:
.... tst-mqueue8
FAIL tst-mqueue8 got 1 expected 0
going to cancel mq_receive in-time
in-time mq_receive cancellation succeeded
going to cancel mq_receive early
Didn't expect signal from child: got `Segmentation fault'
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
into uClibc
|
|
|
|
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
- wire up new kernel
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
- remove symbol prefix
- new startup
- new clone syscall support
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
uClibc doesn't define signal info for the SIGSYS signal which is issued
in case of hitting a syscall prohibited by seccomp.
This is sad as it makes debugging seccomp filter policies impossible on
some architectures (at least ARM and PowerPC, maybe also others) which
do not coincidentally set si_value.sival_int as the syscall number.
To fix this, import the definitions and macros needed from glibc.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This reverts commit bd3eaf83ef1b4954b6c0e7ba8bbdd29b2cd4a833.
They are now implemented.
|
|
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
It seems the condition was reversed which lead to e.g. arm-920t being
confused
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
When compiling python you get duplicate symbol problem.
Seen in the autobuilders of buildroot project.
|
|
|
|
In file included from ./include/sys/syscall.h:33:0,
from libc/sysdeps/linux/common/sync_file_range.c:10:
libc/sysdeps/linux/common/sync_file_range.c: In function '__sync_file_range_nocancel':
./include/bits/syscalls.h:144:16: error: conflicting types for '_v3'
register int _v3 __asm__ ("v3") = _v3tmp;
^
./libc/sysdeps/linux/arm/sysdep.h:281:7: note: in expansion of macro 'LOAD_ARGS_7'
LOAD_ARGS_##nr (args) \
^
./libc/sysdeps/linux/arm/sysdep.h:324:2: note: in expansion of macro 'INTERNAL_SYSCALL_RAW'
INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args)
^
./libc/sysdeps/linux/arm/sysdep.h:256:40: note: in expansion of macro 'INTERNAL_SYSCALL'
({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \
^
libc/sysdeps/linux/common/sync_file_range.c:32:9: note: in expansion of macro 'INLINE_SYSCALL'
return INLINE_SYSCALL(sync_file_range, 7, fd, 0,
^
In file included from ./libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h:18:0,
from ./include/cancel.h:58,
from libc/sysdeps/linux/common/sync_file_range.c:15:
./libc/sysdeps/linux/arm/sysdep.h:280:21: note: previous definition of '_v3' was here
register int *_v3 __asm__ ("v3") = _sys_buf; \
...
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
No need to build crt when just generating headers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|