Age | Commit message (Collapse) | Author |
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
By default, GCC hard codes the name for ld.so to /lib/ld-uClibc.so.0
so our default should match that. If distribution makers want to change
it, they need to change the default gcc configuration as well.
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
So we don't get /usr/usr/bin/getconf when DEVEL_PREFIX="/usr"
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
If libpthread get's pulled in via dlopen(), we need to do libpthread
initialization in dlopen(). Achieve this by making initializer function
out of __pthread_initialize_minimal_internal. Add the proper linker
flags and make it callable multiple times.
Add also nodelete flag which ensures that libpthread will not get
unmapped after it's been loading. Though, ld.so does not yet
support this.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
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>
|
|
Honor the nodelete flags so we don't delete shared library if it's
sticky. This is useful for libpthread if it gets pulled in by a
dlopen'ed library.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Stdio locking macroes do:
void *__self = THREAD_SELF;
But THREAD_SELF uses __self also internally which causes shadowing
warnings. Just rename the outer variable for now. Might be an idea
to convert the macroes to static inline functions.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Update malloc library to use internal uclibc locking primitives
to get the libpthread calls correct.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Since sublevel releases are not ABI compatible we need to adjust
the soname to include the sublevel version.
This makes it possible to install ABI incompatible versions of the
library side by side so clean upgrades are possible.
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
I semi-accidentally added include for libc-lock.h because the intention
was to use locking macroes from there. However, we ended up using using
the weak alias stuff. This is additionally good since now this can result
in compile errors like:
In file included from /toolchain/include/bits/uClibc_mutex.h:16,
from /toolchain/include/bits/uClibc_stdio.h:107,
from /toolchain/include/stdio.h:72,
from /work/freetype-2.3.11/include/freetype/config/ftstdlib.h:100,
from ./builds/unix/ftconfig.h:43,
from builds/unix/ftsystem.c:21:
/toolchain/include/bits/libc-lock.h:309: error: expected '=', ',',
';', 'asm' or '__attribute__' before 'void'
Remove the unneeded include causing breakage.
Reported-by: Kevin Day <thekevinday@gmail.com>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
The libc stubs should never override the libpthread provided
functions inside libpthread, otherwise the struct pthread_functions
that is used by the forwarder stubs goes bad.
Signed-off-by: Timo Teras <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>
|
|
Definition to use protected visibility.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Make sure protected symbols are not overridden by other modules.
Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
This reverts most of commit 1610762362e651f86ca284ac59a1d7ec88034e4e.
Marking the symbols hidden is wrong, because libc accesses
the pthreads internal symbols for internal locking.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
It seems that 57e8823548ad6e65d33b2153edeb18fb0edc20e6 removed completely
sigtimedwait symbol from libc which is wrong. I hope there is not too
many other things like this.
Apparently the libc_hidden_* macros actually make previously hidden
symbols visible globally (creates alias from __GI_* to *). This is
probably ancient confusion from times when gcc did not support
visibility attribute and hiding symbols was done using hacks like
this.
This also adds attribute_hidden to the internal __sigtimedwait for
nptl case.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
We should not check for SIGCANCEL in __libc_sigaction because nptl calls this
function to setup this signal. Nptl provides it's own override for sigaction
that checks that the user cannot override signals nptl uses internally.
Linuxthreads does not use SIGCANCEL at all so this affects nptl only.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
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>
|
|
Currently the stub calls would
demangle the pointer that is never mangled. Alternatively, we could sync
nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c with new glibc version
that properly mangles the pointers, but that would need more validation
to make sure that all struct pthread_function readers do demangling.
uclibc currently does not do pointer mangling everywhere so it's more
consistent to just disable it here too.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
uClibc requires the threading library to enable locking for
stdio, or the locking is not done at all.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
uClibc requires the threading library to enable locking for
stdio, or the locking is not done at all.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Add attribute_hidden to all symbols having libc forwarder. This prevents
recursive self calls which would happen if libc is before libpthread in
linking order: the forwarder functions would call itself via the function
table, since the libpthread symbols would get overwritten with libc ones.
This has not been a problem in glibc since there these symbols are marked
hidden with linker version-script. Since we don't use one, we need to mark
these explicitly.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
allows 'make realclean && make utils' to behave properly
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
On hardened system it could be useful to disable the use
of LD_PRELOAD environment variable for preloading shared objects
before the system libraries. So this patch add a config option,
LDSO_PRELOAD_ENV_SUPPORT, to control this behaviour.
It is enabled by default.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
part1; Needs improvement:
Think about a sensible way to map feature sets to the mandated syms.
Our LEGACY stuff maps to OB, OBXSI for example.
A "normal" config should satisfy the BASE (i.e. $foo.SUSv4.syms)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
i386 was missing a prototype for __tls_get_addr()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
variable 'tmp' set but not used
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Conflicts:
libc/unistd/confstr.c
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Remove the -DUSE___THREAD from specific assembler files since its
used everywhere anyway.
This is a cleanup after 447a9d1cc181395c3e2ea77ea88e45dee4b30ce6
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
curious how 308f5c6e5fd56ea3d1a5512e34388aad788f1180 ever worked.. :P
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
avoids breakage with DODEBUG and lll_timedlock() constraints
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
NPTL defines errno as __thread variable. Define USE___THREAD so proper
errno assignment is used in assembly files.
This fixes segfault while building python.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
forgot extra/config
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
__libc_lock primitives are actually available on uClibc when threading
support is enable, so in this case they can be used.
It also fixes the following compiler warnings:
In file included from libc/misc/regex/regex.c:55:
libc/misc/regex/regex_internal.h:49:1: warning: "__libc_lock_define" redefined
[SNIP]
libc/misc/regex/regex_internal.h:50:1: warning: "__libc_lock_init" redefined
[SNIP]
libc/misc/regex/regex_internal.h:51:1: warning: "__libc_lock_lock" redefined
[SNIP]
libc/misc/regex/regex_internal.h:52:1: warning: "__libc_lock_unlock" redefined
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
(cherry picked from commit 65f9ccdafd008abd9892dfc46fb9737ec4d964c5)
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
__libc_lock primitives are actually available on uClibc when threading
support is enable, so in this case they can be used.
It also fixes the following compiler warnings:
In file included from libc/misc/regex/regex.c:55:
libc/misc/regex/regex_internal.h:49:1: warning: "__libc_lock_define" redefined
[SNIP]
libc/misc/regex/regex_internal.h:50:1: warning: "__libc_lock_init" redefined
[SNIP]
libc/misc/regex/regex_internal.h:51:1: warning: "__libc_lock_lock" redefined
[SNIP]
libc/misc/regex/regex_internal.h:52:1: warning: "__libc_lock_unlock" redefined
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
It doesn't need to provide different definition of elf_machine_type_class
macro depending on TLS support.
It also fixes build for sh architecture when thread support is off:
CC ldso/ldso/ldso.oS
In file included from ./ldso/ldso/sh/dl-sysdep.h:9,
from ./ldso/include/dl-string.h:11,
from ./ldso/include/ldso.h:40,
from ldso/ldso/ldso.c:33:
./include/tls.h:6:22: error: tls.h: No such file or directory
make: *** [ldso/ldso/ldso.oS] Error 1
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
See "Possible regression from timeout commit for resolv.conf" thread.
Also remove superfluous NULL check.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
fixes typo in a1ee5b32fc698297149c770417354441ee62701e which forgot to
rename __pthread_attr_getaffinity_np to pthread_attr_getaffinity_np.
Thanks to Andre DRASZIK for mentioning my omission.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|