Age | Commit message (Collapse) | Author |
|
|
|
|
|
Some powerpc machines can support 64k pages, enabled by the
CONFIG_64K_PAGES option in linux.
However, the uClibc dynamic loader won't currently work on these
machines, as it uses hard-coded values (PAGE_ALIGN, ADDR_ALIGN and
OFFS_ALIGN) in the ldso architecture-specific headers. When running on
a kernel with 64k pages, ld.so tries to mmap with 4k-aligned addresses,
rather than 64k, so mmap fails with -EINVAL.
When booting a 64k machine with a uClibc dynamic linker, init fails
with:
/init:500: can't map '/lib/libc.so.0'
/init:500: can't map '/lib/libc.so.0'
/init:500: can't map '/lib/libc.so.0'
/init: can't load library 'libc.so.0'
Kernel panic - not syncing: Attempted to kill init!
This change allows ld.so determine these alignment masks at runtime,
rather than compile-time. Since we have the _dl_pagesize variable
available, we can use that to generate the appropriate masks.
Since almost all of the architectures can use the common definitions for
the _ALIGN macros, we can consolidate them all in ldso.h, and override
in the sysdep headers where necessary (ie, mips).
This allows me to start a uClibc-based root fs on a 64k machine.
Signed-off-by: Jeremy Kerr <jk at ozlabs org>
|
|
Currently we have an implementation in ld.so and libdl.a.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
|
|
This patch will prefix the i and nr_got variable with an underscore to seperate
them from any variables already present in the functions where the macro is
used.
Needed to silence compiler warnings.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
|
|
Replace __inline__ with __always_inline.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
|
|
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
|
|
Closes #3824
|
|
dl_cleanup will call do_dlclose with the handle.
Inside of do_dlclose, the handle will ultimately get free'd.
|
|
ldso and syscalls are __always_inline (the latter would need more cleanup)
|
|
Closes issue #5194
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
8 byte aligned. The dynamic linker's malloc needs to match this so structures
become 8 byte aligned to void unaligned accesses.
(71_all_uClibc-arm_fix_alignment.patch from gentoo)
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
|
|
always be valid. This patch fixes a part of ldso that had been using an Xtensa CALL0 instruction to get the current PC value, which temporarily clobbered the return address register. The revised code just loads the address of a label in the code. See my change to GCC from 2007-12-20 for more info (http://gcc.gnu.org/ml/gcc-patches/2007-12/msg01023.html).
|
|
|
|
Pass via r4 the rtld finalizer
_dl_fini to the user application. This will be the 6^ arg of
__uClibc_main and will be registered with 'atexit'.
In this way the dynamic linker will be able to call destructors
defined within the loaded DSOs.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Add missing 7th arg "stack_end".
add comment of undocumented usage of r4.
fix comment of expected __uClibc_main() prototype.
Signed-off-by: Yoshii Takashi <yoshii.takashi@renesas.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
|
|
|
|
|
|
|
|
|
|
This fixes build breakage introduced in r22868.
|
|
|
|
- tidy up PTHREADS_DEBUG_SUPPORT by using per-target STRIP_FLAGS for the few
This fixes the spurious rebuilds bernd and vda were seeing with libpthreads.
|
|
It breaks on arches that don't define proper/complete/nice syscall facilities.
|
|
like
o UCLIBC_HAS_GNU_ERROR
o UCLIBC_HAS_BSD_ERR
o UCLIBC_HAS_PTY
o UCLIBC_HAS_GETPT (1)
o UCLIBC_SYSCALL_STUBS
o UCLIBC_SYSCALL_STUB_WARNING
o UCLIBC_LINUX_SPECIFIC (2)
o UCLIBC_BSD_SPECIFIC (3)
o UCLIBC_NTP_LEGACY (4)
o UCLIBC_SV4_DEPRECATED (5)
o UCLIBC_HAVE_REALTIME (6)
o UCLIBC_HAVE_ADVANCED_REALTIME (7)
o UCLIBC_HAVE_EPOLL (8)
o UCLIBC_HAVE_XATTR (9)
o UCLIBC_HAVE_PROFILING (10)
(1) make non-standard getpt optional and implement standard posix_openpt
(2) fstatfs(), inotify_*(), ioperm(), iopl(), madvise(), modify_ldt(),
personality()
ppoll(), setresuid()
(3) mincore(), getdomainname(), setdomainname()
(4) ntp_adjtime(), ntp_gettime() aliases
(5) ustat() [use statfs(2) in your code instead]
(6) All marked as "(REALTIME)" in SUSv3
(7) All marked as "(ADVANCED REALTIME)" in SUSv3
(8) epoll_create(), epoll_ctl(), epoll_wait()
(9) all Extended Attributes
(10) helpers for gcc's -finstrument-functions
- Fixes _dl_exit()
- Implements sleep(3) for !UCLIBC_HAVE_REALTIME
- Implements usleep(3) for !UCLIBC_HAVE_REALTIME
- adds #warning about incorrect posix_fadvise{,64}()
- removes unused and unwanted uselib()
Net outcome is that an allnoconfig with HAVE_SHARED is now about 88k instead
of formerly 130k.
|
|
libc when one of the source files changes.
Since there are more places which want to depend on $(libc), fix them all to
use a new variable $(libc.depend), which contains the filename for which we
have a rule.
|
|
|
|
signedness warnings.
|
|
|
|
Previously a touch ldso/ldso/dl-debug.c && make ldso/ldso/ldso.oS did nothing
|
|
|
|
|
|
<bluebird@porno-bullen.de>
|
|
|
|
- 79 0 28 107 6b libc/inet/rpc/create_xid.o
+ 76 0 25 101 65 libc/inet/rpc/create_xid.o
- 126 0 4 130 82 libc/misc/assert/__assert.o
+ 123 0 1 124 7c libc/misc/assert/__assert.o
- 648 4 24 676 2a4 libc/misc/internals/__uClibc_main.o
+ 645 4 21 670 29e libc/misc/internals/__uClibc_main.o
- 230 0 4 234 ea libc/stdlib/abort.o
+ 216 0 1 217 d9 libc/stdlib/abort.o
- 129 0 4 133 85 libc/termios/tcgetsid.o
+ 126 0 1 127 7f libc/termios/tcgetsid.o
|
|
|
|
|
|
The attached patch adds support for compiling arm uClibc as pure Thumb code.
This is needed because some recent ARM codes do not implement traditional ARM
mode. Specifically:
* Cortex-M1 - An extremely minimal FPGA based core that only implements
Thumb-1 (aka ARMv6-M).
* Cortex-M3 - A Thumb-2 only ARMv7-M core.
Most of uClibc already builds in Thumb mode, all that is left are a handful of
assembly bits.
Tested on arm-uclinuxeabi.
|
|
|
|
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
SIgned-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|