summaryrefslogtreecommitdiff
path: root/ldso
AgeCommit message (Collapse)Author
2009-04-11for sparc v8 MAGIC1 was defined incorrectlyaustinf
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-04-11sparc also needs CONSTANT_STRING_GOT_FIXUP for doing debug printing in ldsoaustinf
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-04-09Fix the ifdef logic broken by last commit for !defined (__mcoldfire__)Khem Raj
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-12ldso: do not comment out unused variables, just delete it.Carmelo Amoroso
SIgned-off-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-03Fix whitespace damage in file.Hans-Christian Egtvedt
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-29- fix use after free (Kevin Day)Bernhard Reutner-Fischer
dl_cleanup will call do_dlclose with the handle. Inside of do_dlclose, the handle will ultimately get free'd.
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-29libdl: use stderr consistently.Carmelo 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-18Use __always_inline for _dl_gettimeofday as well.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-27- remove a couple of duplicate includesBernhard Reutner-Fischer
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-06-03- Revert _dl_exit touch-up.Bernhard Reutner-Fischer
It breaks on arches that don't define proper/complete/nice syscall facilities.
2008-06-03- adds several config-options to allow for turning off certain featuresBernhard Reutner-Fischer
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.
2008-06-01A slight improvement over my previous commit which ensured we always rebuildBernd Schmidt
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.
2008-05-30- fix the macros rather than the callees as rightfully noted by bernds (duh!)Bernhard Reutner-Fischer