summaryrefslogtreecommitdiff
path: root/ldso/ldso
AgeCommit message (Collapse)Author
2009-04-11for sparc v8 MAGIC1 was defined incorrectlyaustinf
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-04-09The attached patches fixes the problems found bringing up uclibc on coldfire Khem Raj
M5485 processor 1. Disable mmap2() if we're compiling for coldfire and fall back to mmap(). It seems to map a different file area on a 2.6.25 linux kernel. 2. Uses pc-relative addresing[1], computes ADDR_ALIGN, PAGE_ALIGN and OFFSET_ALIGN relatively to _dl_pagesize[3]. On coldfire/M5485 _dl_pagesize is 0x2000. Signed-off-by: Groleo Marius <groleo@gmail.com>
2009-03-05Use __always_inline instead of __inline__Carmelo Amoroso
2009-02-23- fix weak ssp symbol on some arches (Peter S. Mazinger)Bernhard Reutner-Fischer
Work around alleged binutils glitch with weak symbols on some arches. See binutils ML, weak psm and vapier.
2009-01-28Remove check for the relocation type check in the resolver,Carmelo Amoroso
from all archs. Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
2009-01-14ldso: performs bootstrap relocations only if required by the arch.Carmelo Amoroso
It is controlled by ARCH_NEEDS_BOOTSTRAP_RELOCS macro. Signed-off-by: Jirka <olsajiri@gmail.com> Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-01-11replace yet another _dl_malloc + _dl_memset with _dl_zallocDenis Vlasenko
2009-01-10simple optimizations and style fixes in dynamic loadingDenis Vlasenko
text data bss dec hex filename - 16709 240 92 17041 4291 lib/ld-uClibc.so + 16634 236 92 16962 4242 lib/ld-uClibc.so - 4602 344 4 4950 1356 lib/libdl-0.9.30-svn.so + 4571 328 4 4903 1327 lib/libdl-0.9.30-svn.so - 4602 344 4 4950 1356 lib/libdl.so + 4571 328 4 4903 1327 lib/libdl.so
2009-01-04ldso/ldso/dl-startup.c: make _dl_elf_main static; remove one dead variable.Denis Vlasenko
ldso/ldso/avr32/dl-startup.h: remove superfluous definition of START() macro. ldso/ldso/*/dl-startup.h: fix a typo in comment text data bss dec hex filename - 16752 244 92 17088 42c0 lib/ld-uClibc.so + 16709 240 92 17041 4291 lib/ld-uClibc.so
2008-12-22- non-pic support for MIPS (Catherine Moore, clm at codesourcery com)Bernhard Reutner-Fischer
2008-12-03- use proper macrosBernhard Reutner-Fischer
2008-12-03- use proper macro (no obj-code changes)Bernhard Reutner-Fischer
2008-12-03- Use runtime pagesize (Jeremy Kerr)Bernhard Reutner-Fischer
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>
2008-11-18Move _dl_iterate_phdr into libc.so.0 and libc.a (as glibc does).Carmelo Amoroso
Currently we have an implementation in ld.so and libdl.a. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-11-07- less verbose make cleanBernhard Reutner-Fischer
2008-11-03Prefix variables defined in INIT_GOT define for AVR32 archHans-Christian Egtvedt
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>
2008-11-03Make sure functions in dl-sysdep.h for AVR32 are always inlinedHans-Christian Egtvedt
Replace __inline__ with __always_inline. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
2008-11-03- jmp on coldfire accepts only address registersBernhard Reutner-Fischer
Closes #3824
2008-10-24- tidy up inline:Bernhard Reutner-Fischer
ldso and syscalls are __always_inline (the latter would need more cleanup)
2008-10-03- use c89-style commentsBernhard Reutner-Fischer
Closes issue #5194
2008-09-30- avoid warning about undefined preprocessor tokenBernhard Reutner-Fischer
2008-09-30- remove shadows declaration of struct st (already declared in function scope)Bernhard Reutner-Fischer
2008-09-29sh_ldso: Fix typo: missing semi-colon.Carmelo Amoroso
2008-09-29Fix comment.Carmelo Amoroso
2008-09-29ldso: allow undefined references to weak symbolsCarmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-09-29ldso: do not use hard-coded fd in _dl_dprintf. Use dl_debug_file consinstently.Carmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-09-25- ARMV5 can use STRD and LDRD access instructions but these accesses need to beBernhard Reutner-Fischer
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)
2008-09-23ldso: removed dead code.Carmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-09-15- commentary typo fixBernhard Reutner-Fischer
2008-09-13xtensa: Stack unwinding on Xtensa requires that the return address register ↵Chris Zankel
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).
2008-08-08Fix SH ldso sequence startup.Carmelo Amoroso
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>
2008-08-06- some more asm keyword fixes (Yann E. MORIN)Bernhard Reutner-Fischer
2008-07-23- trim any trailing whitespaceBernhard Reutner-Fischer
2008-07-23- fix inline keywordBernhard Reutner-Fischer
2008-07-23- fix asm and volatile keywordsBernhard Reutner-Fischer
2008-07-23avr32: Put underscores around asm, inline, etc.Haavard Skinnemoen
This fixes build breakage introduced in r22868.
2008-06-17- move stripping into do_ar resp compile-m for the sake of simplicityBernhard Reutner-Fischer
2008-06-04- strip the targets and not prerequisitesBernhard Reutner-Fischer
- 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.
2008-05-30- fix the macros rather than the callees as rightfully noted by bernds (duh!)Bernhard Reutner-Fischer
2008-05-30- nlist is unsigned. Adjust iterator variables accordingly to avoid ↵Bernhard Reutner-Fischer
signedness warnings.
2008-05-30- Avoid warning about missing brace. No obj-code changes.Bernhard Reutner-Fischer
2008-05-30- fix dependencies of ldso.cBernhard Reutner-Fischer
Previously a touch ldso/ldso/dl-debug.c && make ldso/ldso/ldso.oS did nothing
2008-05-30- Avoid warning about missing brace.Bernhard Reutner-Fischer
2008-05-30- Avoid warning about missing brace. No obj-code changes.Bernhard Reutner-Fischer
2008-05-28Fix the ELF magic number for SPARCV9: by Friedrich Oslage ↵Carmelo Amoroso
<bluebird@porno-bullen.de>
2008-04-24- fixup asm. No object-code changesBernhard Reutner-Fischer
2008-04-16Fix whitespace damage in AVR32 part of ldso.Hans-Christian Egtvedt
2008-03-26Paul Brook writes:Bernhard Reutner-Fischer
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.
2008-03-11Move calculation of rem within if (unlikely statementCarmelo Amoroso
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> SIgned-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-03-09Khem Raj <kraj@mvista.com> writes:Carmelo Amoroso
While compiling trunk on ARM with GCC 4.2 and enabling LDSO_GNU_HASH_SUPPORT I stumbled upon this problem. GCC made a call to libgcc function __aeabi_uidivmod()->__div0()->__raise() and raise is not yet compiled in at the time of compiling ldso so I got well known undefined symbol __raise problem This patch uses the do_rem () macro to do the same operation.