Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This reverts commit c13f823941b103cf744929e5afcb3e2bc1342354.
|
|
These functions are used by firefox for example.
Tested with running firefox on x86 system.
|
|
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.
|
|
Not perfect, but a starting point.
Some tests of the test suite are failing.
|
|
There was a deadlock hanging in a sycall to futex,
which should be solved now.
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
Despite the prev fix, tst-mqueue3 was still segfaulting.
The issue was BLINK register not restored properly for return
00002690 <mq_timedsend>:
2690: sub r9,r25,0x448
2698: ld r10,[r9]
269c: cmp r10,0
26a0: beq -36
26a4: st.aw blink,[sp,-4]
26a8: st.aw r0,[sp,-4]
26ac: st.aw r1,[sp,-4]
26b0: st.aw r2,[sp,-4]
26b4: st.aw r3,[sp,-4]
26b8: st.aw r4,[sp,-4]
26bc: bl 1e28 <__librt_enable_asynccancel>
26c0: mov r9,r0
26c4: ld.ab r4,[sp,4]
26c8: ld.ab r3,[sp,4]
26cc: ld.ab r2,[sp,4]
26d0: ld.ab r1,[sp,4]
26d4: ld.ab r0,[sp,4]
26d8: ld.ab blink,[sp, 4] <---- function return BLINK
26dc: mov r8,182
26e0: trap_s 0
26e2: cmp r0,-1024
26e6: st.aw r0,[sp,-4]
26ea: mov r0,r9
26ee: bl 1e90 <__librt_disable_asynccancel> <-- BLINK clobbered
to next PC
26f2: ld.ab r0,[sp,4] <----| loops here until sp is out of bound
26fa: cmp r0,-1024 |
26fe: jls [blink] -----|
2702: b 15d8
2706: nop_s
So the fix was to retain BLINK on stack before function call, and pop it
later
- 26d8: ld.ab blink,[sp, 4]
+ 26d8: ld blink,[sp] <--- restore BLINK, but retain on stack
26dc: mov r8,182
26e0: trap_s 0
26e2: cmp r0,-1024
26e6: st.aw r0,[sp,-4]
26ea: mov r0,r9
26ee: bl 1e90 <__librt_disable_asynccancel>
26f2: ld.ab r0,[sp,4]
+ 26f6: ld.ab blink,[sp,4] <--- finally pop BLINK
26fa: cmp r0,-1024
26fe: jls [blink]
Reported-by: Eugeniy Paltsev <paltsev@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
This was reported as uClibc test suite failures of tst-mqueue3 and
tst-mqueue5.
The syscall args were getting clobbered, so use scratch regs which are
not used for syscall args
00002690 <mq_timedsend>:
; SINGLE_THREAD_P
2690: sub r1,r25,0x448 <--- clobers r1, r2
2698: ld r2,[r1]
269c: cmp r2,0
26a0: bz mq_timedsend_nocancel
; DOCARGS (saves syscall args but r1, r2 clobbered already)
26a4: st.aw blink,[sp,-4]
26a8: st.aw r0,[sp,-4]
26ac: st.aw r1,[sp,-4]
26b0: st.aw r2,[sp,-4]
26b4: st.aw r3,[sp,-4]
26b8: st.aw r4,[sp,-4]
26bc: bl 1e28 <__librt_enable_asynccancel>
Reported-by: Eugeniy Paltsev <paltsev@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
Remove powerpc64 bits as we only support powerpc32.
|
|
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
|
|
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>
|
|
The code was disabled a while ago in commit:
814b0901f460a246315bfa7933a661f415bdc7fa
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
As this is only implemented for a few architecture and not well
tested, just remove it.
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
|
|
Add test case for the deadlock detection.
Reported-By: Martin Willi <martin@strongswan.org>
|
|
|
|
Simplify and use generic lowlevellock.
Tested-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Simplify and use generic lowlevellock.
Tested-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Simplify and use generic lowlevellock.
Tested-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
lowlevellock.c for arm differs from the generic lowlevellock.c only in
insignificant ways, so can be removed. Follow glibc commit 6d96f5e4c0
Solves __lll_timedlock_wait busy-wait issues described at
http://sourceware.org/bugzilla/show_bug.cgi?id=15119
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
Sync pthread_spin_lock/pthread_spin_trylock with GNU libc as it avoids
any usage of deprecated SWP instruction. This allows to build uClibc-ng
for ARMv8 Cortex-A53 CPU in 32 Bit mode.
|
|
Commit 9c4fce55a (nptl: remove sigaction, sigprocmask, and sigfillset from
libpthread) removed pt-sigaction.c from the build to fix static build.
However, since the libc sigaction is weak when HAS_THREADS is enabled, static
build is not be affected. Tested for xtensa, x86, MIPS32 targets.
Fixes nptl/tst-signal7.
Moreover, commit 9193a76bb from the 0.9.33 branch has the right version.
Ref.: http://patchwork.ozlabs.org/patch/286084/
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
License notices in most of the source files refer to an outdated
FSF address. Replace it with URL, like in the rest of the source
files.Signed-off-by: Nikola Forró <nforro@redhat.com>
|
|
|
|
Trivial fix.
Signed-Off-By: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
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.
|
|
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
Commit 2d9740a65a "uclibc: nptl: fix __lll_lock_wait_private multiple definition"
did a sweeping change which did for all in tree arches at that time (ARC
wasn't)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
|
|
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>
|
|
Sync with glibc, quietens gcc warnings.
|
|
|
|
Found via buildroot autobuilder.
|
|
Native gdb makes a ptrace (GET_THREAD_AREA) which needs to return the
TP. however when libc sets up TP reg (for main thread), it doesn't call
arc_settls syscall so kernel doesn't know of TP register details
(moreso because clone doesnt have SETTLS flag)
Note that kernel doesn't know about r25 being TP etc.
This commit got lost in merge of NPTL tools into arc-mainline-dev and
showed up again as STAR 9000919529 (native gdb can't debug threaded
apps)
------->8---------------
[ARCLinux]# gdb ./pth
Reading symbols from ./pth...(no debugging symbols found)...done.
(gdb) b main
Breakpoint 1 at 0x106f2
(gdb) r
Starting program: /pth
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
thread_get_info_callback: cannot get thread info: generic error
(gdb) q
------->8---------------
Debugged-by: Anton Kolesov <akolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.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>
|
|
When built with gcc 5.1, uClibc-ng fails to build with the following
issue:
librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
rt-unwind-resume.c:(.text+0x3c): undefined reference to
This commit fixes the code in a way similar to what was done in glibc
in commit:
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=175cef4163dd60f95106cfd5f593b8a4e09d02c9
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
pt-initfini eventually depends on xlocale
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
ucontext_i.h too depends on uClibc_config.h.
Update it to look like the other MANGLE generated files and tweak
prereqs
Fixes: make realclean ; make -j libc/misc/internals/__uClibc_main.i
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Add __LEAF to all __THROW, introduce non-leaf __THROWNL
Adjust affected spots accordingly.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
|
|
amending commit 49a67cf67d5a7194214566bc730ee7e28d55bbe1
could need a thumb implementation..
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
|
|
could need a thumb implementation..
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Changes from:
https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl
Author: Chris Zankel <chris@zankel.net>
Author: Baruch Siach <baruch@tkos.co.il>
|
|
Automatic patching via two oneliners by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>:
sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' -e '/^ASFLAGS-pt-vfork\./d' $(git grep -l pt-vfork libpthread/nptl/sysdeps)
find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \;
Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
define NOT_IN_libc / IS_IN_libxxx appropriately
to fix pthread_once
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|