summaryrefslogtreecommitdiff
path: root/ldso/ldso/sh
AgeCommit message (Collapse)Author
2009-11-15ldso: Add missing newlines to some debug messagesBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-15ldso: clean up breakage in tls mergeMike Frysinger
The TLS merge 534661b91c9849 introduced multiple style problems as well as random breakage: - missing _dl_free - incomplete parametrization of _dl_lookup_hash - restore FDPIC handling in _dl_lookup_hash Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-06trim whitespaceBernhard Reutner-Fischer
and wrap superlong line. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-26ldso/: tls support for dynamic linkerAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-03-05Use __always_inline instead of __inline__Carmelo Amoroso
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-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-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-10-24- tidy up inline:Bernhard Reutner-Fischer
ldso and syscalls are __always_inline (the latter would need more cleanup)
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-15- commentary typo fixBernhard 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-07-23- fix inline keywordBernhard Reutner-Fischer
2008-07-23- fix asm and volatile keywordsBernhard Reutner-Fischer
2008-01-12Make sh4 build works again adding a temporary work-aroundCarmelo Amoroso
iby redefining __always_inline to inline until gcc 4.x.x will get fixed. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-01-12Make sh4 build works again adding a temporary work-aroundCarmelo Amoroso
iby redefining __always_inline to inline until gcc 4.x.x will get fixed. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2007-03-13Carmelo Amoroso writes:Joakim Tjernlund
I experiencied some problems while trying to debug the ld.so (sh4) in debug mode. I found that the _start code was not placed into any PT_LOAD segment causing a SIGSEV. I solved this issue explicitely placing the _start code into the .text section (see attached patch).
2006-06-19eat extraneous ; and insert some whitespace where it belongsMike Frysinger
2006-01-30back to inline, mips failsPeter S. Mazinger
2006-01-24- use keywords __asm__ and __inline__ c99.Bernhard Reutner-Fischer
2006-01-19move a bunch of arch-specific checks out of common files and into an arch ↵Mike Frysinger
specific header file to make porting/updates a lot easier
2006-01-17since just about everyone uses return _dl_elf_main for START() now, make it ↵Mike Frysinger
the default
2005-11-21Partly undo earlier patch on vapier's requestPeter S. Mazinger
2005-11-21Guard debug_sym/debug_reloc, make sure elfinterp.c sees __SUPPORT_LD_DEBUG__Peter S. Mazinger
2005-09-21__set_errno must be redefined after #include "sys/syscall.h".Joakim Tjernlund
syscall.h should not have it's own version of __set_errno, instead syscall.h should include errno.h(see powerpc) since errno handling depends on threads/no threads. I leave the the fixing of syscall.h since there might be some smaller compile problems.
2005-08-15move arch-specific checks out of shared dl-syscall.h and into arch-specific ↵Mike Frysinger
dl-syscalls.h
2005-08-10use the inline version of _dl_parse_dynamic_infoMike Frysinger
2005-08-09clean up whitespace/syntaxMike Frysinger
2005-08-09eat whitespaceMike Frysinger
2005-07-07rip out all the duplicated debug code and move into a shared fileMike Frysinger
2005-04-27Simplify PERFORM_BOOTSTRAP_RELOC() default path.Paul Mundt
This makes sh and sh64 get more in line with what the other architectures are doing. Also fixes up some build failures.
2005-03-29Moved the addition of load address from the fast pathJoakim Tjernlund
where possible. This will also make ldso smaller. However the patch touches all archs and I have only tested PPC and x86.
2005-03-17General arch cleanup and prepare support for standaloneJoakim Tjernlund
execution of ldso. Added new asm for MIPS to be tested. All arches should retest.
2005-03-14Generalize optimized relative reloc procesing.Joakim Tjernlund
Add elf_machine_dynamic() and elf_machine_load_address() for all archs. elf_machine_dynamic() replaces the #ifdef mess to get at the GOT. elf_machine_load_address() is needed to execute ldso directly, this is not complete yet. I probably broke one or two archs(only tested PPC) so please try and report problems. For a report to be useful you need to enable __SUPPORT_LD_DEBUG_EARLY__ and __SUPPORT_LD_DEBUG__
2004-11-10Add RTLD_LOCAL support for dlopened libs. Reported byJoakim Tjernlund
Andrew de Quincey, who has been most helpful getting this sorted out, thanks. Thanks also to Peter Mazinger who did alot of testing. Removed all traces of dl_parse_copy_information() since it is no longer used.
2004-09-23Don't allow undefined global symbols to pass.Joakim Tjernlund
Move COPY relocs back to _dl_do_reloc().
2004-08-26Stefan Allius writes:Joakim Tjernlund
"I fixed the _dl_parse_copy_information in the same way than for the powerpc and it works fine for me. You may luck at the patch for the powerpc/elfinterp.c, where I change the paramter of a dl_dprintf statement. Now we use the same parameters than for the relocation copy." Arch mantainers, please do the same. When all arches has been fixed, we can remove of _dl_parse_copy_information, it is just a waste of CPU cycles.
2004-08-25Patch from Stefan Allius:Joakim Tjernlund
Remove unused function parameter in ldso. Remove echo option '-e' since it is not supported on Solaris.
2004-08-17Carl SHAW writes:Eric Andersen
I finally tracked down the problem with SH4 shared library loading - in file ldso/ldso/sh/dl-startup.h, the line #define DL_BOOT(X) static void __attribute_used__ _dl_boot2 (X) should be #define DL_BOOT(X) static void* __attribute_used__ _dl_boot2 (X) otherwise the application code will never be called and _dl_boot will just return causing a segmentation fault. Carl
2004-08-17David McCulloug writes:Joakim Tjernlund
"There's a bug in the SH asm, it calls into 'C' code without preserving all the important scratch registers. I have been meaning to double check the changes as I think more registers need to be saved, then I was going to send it back to uClibc. From the sound of it this isn't your problem, but you never know. Attached is the patch as it stands for the loader on SH." Glibc appears to do the same.
2004-08-17Let ldso decide if it should relocate itselft a second time. ThisJoakim Tjernlund
is needed if ldso should use libcs malloc whenever possible. Fix RTLD_LAZY propagation to RTLD_NOW relocation when requested by libdl.
2004-05-12Add a local '_dl_errno' to be used by syscalls in ldso, allowingEric Andersen
useful syscall failure diagnostics.
2004-04-20Cope with gcc 3.4's more aggressive persuit of attribute unusedEric Andersen
2004-02-17Seperate out the startup stuff from the non-startup stuff.Eric Andersen
Begin converting some big ugly macros to inline functions instead
2004-02-14Give gcc branch prediction some hits on obviously unlikely branchesEric Andersen
2004-02-14Joakim Tjernlund writes:Eric Andersen
Hi it is me again. This is the latest ldso patch. the NEW weak symbol handling works now with a little special handling in _dl_find_hash(). You get to chose if you want the new or old handling :) There was 2 missing _dl_check_if_named_library_is_loaded() calls in _dlopen(). I then disabled the _dl_check_if_named_library_is_loaded() in dl-elf.c since it is rendundant. Question, why does some _dl_linux_resolver(), like i386, have 2 calls to _dl_find_hash()? I think that is wrong, isn't it? I really hope you can check this out soon ...
2004-02-10Rework file naming, aiming for at least a vague level of consistancyEric Andersen
2004-02-07Restore the library entry point so it works. It does haveEric Andersen
to be arch specific to work properly.