Age | Commit message (Collapse) | Author |
|
Linker is smart and does not pull in weaks.os, ever. This happens
because that compilation unit does not get strong references and
ld eliminates dead code. We really need the weaks for static build
in a compilation unit that is always there, otherwise it won't work.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Roman I Khimov <khimov@altell.ru>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Final iteration to fix libc internal locking if libpthread is pulled
in by dlopen call (directly or indirectly).
We cannot really use the weak symbol trick for shared build, since
the symbols won't get refreshed if libpthread is pulled in dynamically.
In glibc, they have #ifdef SHARED magic to either use pthread_functions
table, or weaks. But as we shared object files with both builds, this
does not sounds good either.
The reintroduces the libc weaks.c, but uses them now only with static
build. For dynamic build, we still use the symbols with same name, but
provide weaks in forward.c so they end up dereferencing the
pthread_functions table indirectly if we are not linked to libpthread.
Mutex initialization is hard coded as inline, as it needs to happen even
if libpthread is not initially loaded.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
It is not possible to override for libpthread to override
the weak libc definitions. This has never worked in uclibc, and
does no longer work in glibc either (unless you use LD_DYNAMIC_WEAK).
The proper thing to do is have weak prototypes in libc, and
definitions in libpthread only. This way libc runs even if
those functions are not defined, but just needs to protect
against the NULL values (done by implementing __uclibc_maybe_call).
This fix the problems if libc is linked before libpthread or
if libpthread is pulled by a dependency library.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Conflicts:
Makefile.in
extra/Configs/Config.in
libc/sysdeps/linux/common/bits/kernel-features.h
libc/sysdeps/linux/common/poll.c
libc/sysdeps/linux/common/sysdep.h
libc/sysdeps/linux/sh/sysdep.h
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
* updated kernel-features.h
* system is provided by pt-system with nptl
* _exit should do exit_group with nptl
* tsd tls ptr in libc
* rt_sigwaitinfo impl added
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Handle O=
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
|
|
|
|
|
|
|
|
though I still need to silence the warnings about _pthread_cleanup_push_defer
|
|
things, and avoid potential deadlocks caused when a thread holding a uClibc
internal lock get canceled and terminates without releasing the lock. This
change also provides a single place, bits/uClibc_mutex.h, for thread libraries
to modify to change all instances of internal locking.
|
|
|
|
|
|
linuxthreads[_db] as well, don't try on slow box
|
|
libc.a/libc.so, the diffs go into libc-static-y/libc-shared-y exclusively, add IMA to libc, don't use any MSRC anymore
|
|
is a useless attempt
|
|
|
|
|
|
|
|
|
|
the weaks that we arent actually using atm, and in general touchup the code
|
|
|
|
|
|
|
|
libc-a-y for objects that go into static libs, changing their suffix to .os, of they should be PIC
|
|
|
|
archs lack proper crt1. The Makefiles in extra/scripts are intended to be linked into each dir, where it is necessary to build locally.
|
|
objects at once; use :=//$</$^; use CRT_SRC/CRT_OBJ/SCRT_OBJ/CSRC/COBJ/SSRC/SOBJ/MSRC/MOBJ where no more is needed, if only CSRC is present use OBJS directly instead of COBJ; CTOR_TARGETS are created directly in lib; remove unused/unneeded parts. Hope I haven't broken too much.
|
|
but they do no harm for the linuxthreads case. Yes, I tested this.
|
|
|
|
|
|
|
|
Hi Erik
It seems to me that __pthread_once and __pthread_initialize_minimal could be made
WEAKs with no stub. The code in rpc_thread.c and __uClibc_main.c appears to expect this.
Also, __pthread_return_0 __pthread_return_1 and __pthread_return_void can be static, not to
pollute the name space.
Jocke
|
|
missing one in the glibc abi, and including a number of extras (which I
left in commented).
Unfortunately, this brings back the perl pthread bug. Fixing the incorrect
weaks in libpthread wasn't sufficient to escape the shared loader bug. :-(
|
|
were including libc-lock.h which had a bunch of weak pragmas. Also,
uClibc supplied a number of no-op weak thread functions even though
many weren't needed. This combined result was that sometimes the
functional versions of thread functions in pthread would not override
the weaks in libc.
While fixing this, I also prepended double-underscore to all necessary
weak thread funcs in uClibc, and removed all unused weaks.
I did a test build, but haven't tested this since these changes are
a backport from my working tree. I did test the changes there and
no longer need to explicitly add -lpthread in the perl build for
perl to pass its thread self tests.
|
|
rm.patch:
* Define $(RM) as rm -f in Rules.mak and test/Rules.mak
(this is the same definition as gmake uses by default).
* Change all occurrences of rm and rm -f into $(RM).
|
|
|
|
storage....
-Erik
|
|
|
|
glibc 2.1.3 and ported to work with uClibc by Stefan Soucek and Erik Andersen
(me). Stefan has hacked things up such that linuxthreads runs on MMU-less
systems (tested only on arm-nommu). Erik cleaned things up and made it work
properly as a shared library.
-Erik
|