Hi,
I'm experiencing problems with uClibc-ng when creating static binaries
that uses threads. I originally reported this to the buildroot mailing
list but got redirected here instead.
The problem is when using a combination of stack protection, threads and
static binaries. The program will during start up get a sigsegv in
__pthread_initialize_minimal_internal(), and gdb says the instruction is
a
mov %fs:0x28,%rax
where %fs is 0x00. The reason for that is that the pthread library is
compiled with stack protection but __pthread_initialize_minimal_internal
is called before __libc_setup_tls in static binaries.
I have created an ugly patch to verify my hypothesis (attached). With
that patch the test program works, but what is the proper way to solve
this issue?
With uClibc 0.9.33.x the same thing happens. With glibc the program
works.
Best regards,
Daniel Fahlgren
Hello,
I'm trying to build uClibc-based userspace for uclinux. It builds
and works as long as I keep uClibc single-threaded. If I enable
TLS and NPTL support first I face build errors (one caused by
reference to fork from libpthread/nptl/sysdeps/unix/sysv/linux/fork.c,
other outside uClibc, in the elf2flt, which cannot deal with .tbss
section overlapping .data section) and then runtime errors
(an attempt to allocate TLS memory with sbrk which doesn't
work in uclinux and then inability to initialize TLS data, which I
haven't tracked yet). All that makes me think that either I'm doing
something terribly wrong, or TLS + NPTL are not supported by
uClibc for uclinux.
So my questions are:
- are TLS and NPTL supported by uClibc for uclinux?
- if not, what are the supported threading options?
--
Thanks.
-- Max
Hi,
I'm trying to compile a sourcecode that makes use of sigsetmask() function
against uClibc-ng 1.0.6. This symbol is missing from uClibc-ng built with
default Buildroot 2015.08 config. Which option should be enabled to have it?
I only found two signal options in the config:
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL and UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL. The
former was enabled by default, the latter was off, but turning it on
doesn't help too.
I see that sigsetmask() is just a wrapper around sigset_set_old_mask,
sigprocmask and sigset_get_old_mask, but I don't want to resort to patching
the user app sourcecode if possible.
Thanks,
Alex
Hello,
I've noticed that several NPTL tst-cancelx* tests fail on ARM, because functions
invoking cancellable syscalls are compiled without -fasynchronous-unwind-tables
making it impossible for the libgcc DWARF unwinder to unwind stack past the
syscall and call the cleanup routine. They work on x86_64, because x86_64 gcc
has -fasynchronous-unwind-tables enabled by default, and on xtensa because it
uses custom unwinding code. I haven't checked, but AFAIU it should fail on other
architectures that use DWARF unwinder. Can anybody confirm that?
I guess that at least all functions that invoke cancellable syscalls
need to be built
with -fasynchronous-unwind-tables in their CFLAGS. I've tried that
with couple of
functions and it fixes corresponding tests. And that's what glibc does in
nptl/Makefile. Does that sound right for uClibc?
--
Thanks.
-- Max
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, 1.0 has been updated
via 5a167e319ca2bee566d330d1c901d76dc53deea7 (commit)
from 090e6baca19f4209a23fb05d9928f51a67c3d5af (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5a167e319ca2bee566d330d1c901d76dc53deea7
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Fri Sep 11 13:34:14 2015 +0200
Revert "tgmath.h: disable builtins"
This reverts commit d1671548b968103f4df1b80659e60ae1fc5a67b3.
You get following errors while compiling freeswitch:
awgn.c: In function 'awgn_init_dbov': awgn.c:110:5: error: void value not ignored as it ought to be s->rms = pow(10.0, level/20.0)*32768.0;
Reverting this commit allows to build the code.
-----------------------------------------------------------------------
Summary of changes:
include/tgmath.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/tgmath.h b/include/tgmath.h
index ce20d42..1dc3595 100644
--- a/include/tgmath.h
+++ b/include/tgmath.h
@@ -47,7 +47,7 @@
/* 1 if 'type' is a floating type, 0 if 'type' is an integer type.
Allows for _Bool. Expands to an integer constant expression. */
-# if 0 /* __GNUC_PREREQ (3, 1) */
+# if __GNUC_PREREQ (3, 1)
# define __floating_type(type) \
(__builtin_classify_type ((type) 0) == 8 \
|| (__builtin_classify_type ((type) 0) == 9 \
hooks/post-receive
--
uClibc-ng - small C library for embedded systems
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via e346b11a82b8f4851306b25e31a25b2dad532ea8 (commit)
from aaab37cb397b77fa83eccd338da7b5ebab2dc49d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e346b11a82b8f4851306b25e31a25b2dad532ea8
Author: Waldemar Brodkorb <wbx(a)uclibc-ng.org>
Date: Fri Sep 11 13:34:14 2015 +0200
Revert "tgmath.h: disable builtins"
This reverts commit d1671548b968103f4df1b80659e60ae1fc5a67b3.
You get following errors while compiling freeswitch:
awgn.c: In function 'awgn_init_dbov': awgn.c:110:5: error: void value not ignored as it ought to be s->rms = pow(10.0, level/20.0)*32768.0;
Reverting this commit allows to build the code.
-----------------------------------------------------------------------
Summary of changes:
include/tgmath.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/tgmath.h b/include/tgmath.h
index ce20d42..1dc3595 100644
--- a/include/tgmath.h
+++ b/include/tgmath.h
@@ -47,7 +47,7 @@
/* 1 if 'type' is a floating type, 0 if 'type' is an integer type.
Allows for _Bool. Expands to an integer constant expression. */
-# if 0 /* __GNUC_PREREQ (3, 1) */
+# if __GNUC_PREREQ (3, 1)
# define __floating_type(type) \
(__builtin_classify_type ((type) 0) == 8 \
|| (__builtin_classify_type ((type) 0) == 9 \
hooks/post-receive
--
uClibc-ng - small C library for embedded systems