Age | Commit message (Collapse) | Author |
|
Patch by Steve Ellcey <sellcey@imgtec.com> on uClibc mailinglist.
|
|
|
|
This is for example required, used and tested with OpenJDK 7.
No regressions found, while running the testsuite with embedded-test.
|
|
The result of the calculation in register a12 is never used as the
function _dl_linux_resolver only accepts 2 arguments. Drop it.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This noticeably lowers the number of mprotect calls at program startup,
e.g. for busybox: 7 calls vs 1835 calls.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
|
|
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
|
|
From OpenWrt:
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/613-mips64_more_relocation_fixes.patch
|
|
Remove leftover code.
|
|
Changes from:
https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl
Author: Chris Zankel <chris@zankel.net>
Author: Baruch Siach <baruch@tkos.co.il>
|
|
define NOT_IN_libc / IS_IN_libxxx appropriately
to fix pthread_once
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Thanks to Waldemar Brodkorb for noticing!
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Joern Rennecke <joern.rennecke@embecosm.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
As Will noticed, the header this check is currently done in
is asm-only, and is not meant to be included from C code.
This breaks compilation when compiled for a Thumb2-aware CPU.
Move the BX check to its own header, and revert 7a246fd.
Reported-by: Will Newton <will.newton@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Will Newton <will.newton@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The table format is thrown off a bit because some of these names are
too long to fit the previous format so they were put on their own
lines.
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
These should have been protected by
if (_dl_debug_reloc && _dl_debug_detail)
, but since the previous change "ldso/mips: actually print results of
each relocation" makes this redundant, just eliminate these prints
instead. I think this is the only item that is still printing
regardless of the value of LD_DEBUG when uClibc is built with
SUPPORT_LD_DEBUG=y.
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The patched line was outside of the body of the loop over relocations
and so would only print the results of the last relocation, fix that.
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Apparently i made a typo when applying
278a06d7abcc8774ba9bb9c15779749c7e2d68cd
sorry..
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
If the dynamic linker is built with LDSO_STANDALONE_SUPPORT=y, it can
load then run a dynamically linked program when explicitly invoked
from the command line. This is used for test and prelink purposes,
and also by other tools like PRoot to force the kernel to load the
right ELF interpreter.
This feature is currently broken on x86_64 since the number of command
line arguments (ie. argc) passed from the kernel is an "elf_addr_t"
(64 bit on x86_64), whereas it is read as an "unsigned int" (32 bit on
x86_64).
Ref: https://github.com/cedric-vincent/PRoot/issues/45
Signed-off-by: Cédric VINCENT <cedric.vincent@st.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This addition allows building uClibc with -mtext-section-literals
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Use the generic runtime pagesize as per
ce54b92b046b65464e2d16b3842f3e97e3e0f27e
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Use spaces instead of tabs in the table to accomodate different tab
settings.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
When accessing errno, a per thread variable, from _stdio_init
a SIGBUS error happens. This change fixes the wrong relocation
and debug output.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
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>
|
|
Commit e3dec33ba (powerpc: Add TLS and NPTL support) introduced a duplicate of
_dl_add_to_slotinfo and _dl_initial_error_catch_tsd declarations.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The following warning introduced with commit 231e4a9b4 (libdl: fix dlopen
implementation from statically linked application):
ldso/libdl/libdl.c: In function 'do_dlopen':
ldso/libdl/libdl.c:311:23: warning: unused variable 'ls' [-Wunused-variable]
Cc: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This fixes the following warning when SUPPORT_LD_DEBUG_EARLY is not enabled:
ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
ldso/ldso/ldso.c:754:16: warning: unused variable 'tmp' [-Wunused-variable]
This was introduced with commit 94cc6edb (ldso: Rework global scope handling
and symbol lookup mechanism).
Cc: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
On MIPS, several relocations that were original only resolved by the
dynamic linker were reused as static relocations. Consequently the
macros TLS_DTPREL_VALUE and TLS_TPREL_VALUE defined in
libpthread/nptl/sysdeps/mips/dl-tls.h need to be available even for
!SHARED.
Relevant: http://www.linux-mips.org/wiki/NPTL#History
Original patch by Vincent Wen <wenvincent@gmail.com>:
http://lists.uclibc.org/pipermail/uclibc/2013-April/047707.html
When build statically linked applications for MIPS platform,
sometimes the linker fails with following errors:
undefined reference to TLS_DTPREL_VALUE
undefined reference to TLS_TPREL_VALUE
The include of dl-tls.h is only in code guarded by SHARED,
Removing the SHARED compilation option to cover static link too.
Signed-off-by: Vincent Wen <wenvincent90@gmail.com>
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Calling dlopen from statically linked application is actually broken,
because _dl_find_hash enters into an infinite loop when trying to
resolve symbols. In this case it doesn't need to extend the global
scope, it is readyto be used as it is, because _dl_loaded_modules already points
to the dlopened library.
The patch also fixesi a typo in __LDSO_LD_LIBRARY_PATH__ macro, that was
preventing to get the actual value of the LD_LIBRARY_PATH.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
It's not safe to use the aux vect inside __uClibc_main if we are running
with shared libraries, because it could have been already modified.
For example, if some constructor plays with environment variables by
using unsetenv, the modifications done into the stack to unset an
environment variable, have impacts on the aux vect due to the extra NULL
entries added.
Due to this, __uClibc_main is not able to detect where the aux vect
starts, so all the entries that are used by __uClibc_main (AT_UID,
AT_EUID, AT_GID, AT_EGID, AT_PAGESZ and possibly other arch specific)
are impacted.
Same side effect on the aux vect is caused by the ld.so when running a
SUID program with some of the unsecure environment variables set, that
will be unset by the ld.so itself.
In order to fix this issue, it needs to handle aux vect entries into
__uClibc_main only if SHARED is not defined.
In SHARED case, libc refers to __dl_secure and _dl_pagesize as initialised
by the ld.so where the aux vext is still untouched.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
do_dlopen contains __builtin_return_address to determine from
whence it was called, and uses that to determine which dynamic
object's data it should use to start the search. (In the bug I was
tracking, this related to whether the application's RPATH was used or
not.) For that to work, it has to have been inlined into the wrapper
function.
As it happens, it wasn't being inlined. That's an unfortunate compiler
behaviour, but it isn't wrong and shouldn't have caused dlopen to fail.
This patch changes things so the wrapper function determines the
return address, and passes it to the worker. If the worker's inlined,
the generated code should be exactly the same as before.
Signed-off-by: Nathan Sidwell <nathan@codesourcery.com>
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Meta cores are 32-bit, hardware multithreaded, general purpose, embedded
processors which also feature a DSP instruction set, and can be found in
many digital radios. They are capable of running different operating
systems on different hardware threads, for example a digital radio might
run RTOSes for DAB decoding and audio decoding on 3 hardware threads,
and run Linux on the 4th hardware thread to manage the user interface,
networking etc. HTPs are also capable of running SMP Linux on multiple
hardware threads.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
CC ldso/ldso/ldso.oS
In file included from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:35:1: warning: "S_ISUID" redefined
In file included from ./include/bits/kernel_stat.h:10,
from ./ldso/include/dl-syscall.h:31,
from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./include/sys/stat.h:163:1: warning: this is the location of the
previous definition
In file included from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:36:1: warning: "S_ISGID" redefined
In file included from ./include/bits/kernel_stat.h:10,
from ./ldso/include/dl-syscall.h:31,
from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./include/sys/stat.h:164:1: warning: this is the location of the
previous definition
-----------------------------------------------------------------
Cleanly seperated the legacy ABI vs. new ABI scenario.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The name was changed to include a trailing 'D' when it went into the
kernel.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The current code for dlsym() when invoked with RTLD_NEXT lookup
searches for the module where it's being called from, and executes the
_dl_find_hash only for the next module in the chain. However, if the
looked symbol is not there, the rest of the modules are not checked.
Generally this is not a problem as symbols are merged for the parent
modules; so this affects only RTLD_NEXT.
This patch adds a loop iterating through all the following modules.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Reviewed-by: Filippo ARCIDIACONO <filippo.arcidiacono@st.com>
Tested-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This drops __signed, __volatile, and __const. Only the latter was
used in the code base, and for uClibc, not consistently. Much of
the code used plain "const" which meant "__const" was useless.
Really, the point of this is to stay in sync with what glibc did.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
This matches a similar change made to glibc.
No functional changes here.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Building with NPTL enabled and shared library support disabled we hit:
In file included from libpthread/nptl/sysdeps/generic/dl-tls.c:30:0:
./ldso/include/dl-elf.h: In function '__dl_parse_dynamic_info':
./ldso/include/dl-elf.h:173:20: error: 'RTLD_NODELETE' undeclared (first use in this function)
./ldso/include/dl-elf.h:173:20: note: each undeclared identifier is reported only once for each function it appears in
make: *** [libpthread/nptl/sysdeps/generic/dl-tls.os] Error 1
A previous commit (f26c5f6952ce9bf8edec9c1571c47addb1bcc442) touched
on a similar issue, but added the include to the incorrect location.
Reported-by: Christophe Lyon <christophe.lyon@st.com> [arm nommu]
Reported-by: Daniel Beecham <daniel@lunix.se> [static x86_64]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|