summaryrefslogtreecommitdiff
path: root/ldso/ldso/sh
AgeCommit message (Collapse)Author
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.
2004-02-07Split off the stuff that cannot use function into its own file,Eric Andersen
to make it easier to treat it specially while not bothering the rest of the code with the same constraints.
2004-01-29Modify interfaces for _dl_parse_relocation_information()Eric Andersen
_dl_parse_lazy_relocation_information() and _dl_parse_copy_information() so they are all consistant, allowing for future consolidation. Trim some trailing whitespace as well.
2003-12-17Patch from Paul Mundt <lethal@linux-sh.org>:Eric Andersen
For sh64 we need implicit access to the symtab, primarily to get at the ->st_other value. This presently isn't possible, as PERFORM_BOOTSTRAP_RELOC() is invoked as such: PERFORM_BOOTSTRAP_RELOC(rpnt, reloc_addr, symbol_addr, load_addr); while we can easily get the symtab_index value from rpnt->r_info, this still doesn't buy us easy access to the actual table. As such, I've modified PERFORM_BOOTSTRAP_RELOC() to take an additional SYMTAB argument. Most architectures aren't going to care about this, but unfortunately we don't have any other options for sh64. The following patch fixes up the API for what we need for sh64, and updates the other architectures appropriately.
2003-09-11Stefan Allius writes:Eric Andersen
Hello, my patch changed the format of the ldso debug output to the same format as on the i386 systems. By Stefan
2002-11-08Another SuperH patch from Stefan Allius. This make it soEric Andersen
the SuperH lib loader can be compiled by GCC 3.3
2002-11-05Massive scrubbing of the shared lib loader error handling.Eric Andersen
Move all configuration options into the new config system. -Erik
2002-11-03Several SH lib loader patches by Stefan Allius <allius@atecom.com>Eric Andersen
and "M. R. Brown" <mrbrown@0xd6.org>
2002-11-03Patch from M. R. Brown <mrbrown@0xd6.org> to get rid ofEric Andersen
"depreciated multi-line string literals" warnings
2002-10-01This commit contains a patch from Stefan Allius <allius@atecom.com> to changeEric Andersen
how uClibc handles _init and _fini, allowing shared lib constructors and destructors to initialize things in the correct sequence. Stefan ported the SH architecture. I then ported x86, arm, and mips. x86 and arm are working fine, but I don't think I quite got things correct for mips.
2002-09-12Add missing _dl_dprintf arguments, as noticed by Tero Lyytik�inen ↵Eric Andersen
<tero@paravant.fi>
2002-08-19some updates from Stefan Allius to make up the SuperH shared libEric Andersen
loader build properly. Mostly just sprinkling casts, and making static some things that should be static.
2002-08-09Link ldso vs libgcc.a and eliminate baggage caused byEric Andersen
not previously linking vs libgcc -Erik
2002-08-09Patch from Stefan Allius, avoid compiler warnings (unused variable)Eric Andersen
2002-08-08Patch from Stefan Allius and Edie C. Dost to add SuperHEric Andersen
shared library support. This also adds some cleaner error handling, which I (Erik) then ported over to x86 and arm. In addition Stefan added the following fixes: - in hash.c was the lvalue handling of global library functions wrong. To fix this I had to change the prototype of _dl_find_hash. (==> TIS and ELF spec. Vers. 1.2) - in ldso.c was the order of the .init sections calls wrong. Before we call the initialization code of a library we have to check that all dependend libraries are already initialized. This can easily made by calling it in the revers loading order. For this I added a previous pointer chain. - in ldso.c the ELF magics wasn't checked fo PPC, MIPS and SH architecture