summaryrefslogtreecommitdiff
path: root/ldso/ldso/mips
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-07-07get rid of arch-specific defines in dl-startup.c and make each arch declare ↵Mike Frysinger
its requirements about initial bootstrapping
2005-07-07rip out all the duplicated debug code and move into a shared fileMike Frysinger
2005-06-10Finish updating mips for the new ABIEric Andersen
2005-05-01On mips, gdb explicitly looks for the symbol "__dl_runtime_resolve" so changeEric Andersen
the name of our mips resolver function to match gdb's expectations.
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-17Fix ldso for MIPS.Joakim Tjernlund
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-15Fix MIPS initial GOT relocation.Joakim Tjernlund
2005-03-14Make mips at least compileEric Andersen
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-17Add BIND NOW support to MIPS.Joakim Tjernlund
Mips did not honour the LD_BIND_NOW env. variable or the DT_BIND_NOW flag in the dynamic section.
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-11-02- Remove dynamic_size from struct elf_resolve.Joakim Tjernlund
- Replace all open coded dynamic handling with a function. Reduces size. - Fold special MIPS dynamic code into the dynamic_info item. - Add RELRO support. - Support linking with "-z now". - prepare for DT_RELACOUNT/DT_RELCOUNT optimization. - Add -z now to ld.so linking, this is what ld.so does anyway so let the linker know that.
2004-09-23Make do_rem() safe. From Peter Kjellerstedt.Joakim Tjernlund
2004-08-26Only print debug stuff when askedEric Andersen
2004-08-26Avoid multiple passes to perform mips GOT relocations, and doEric Andersen
the whole lot in a single pass. -Erik
2004-08-26Relocations of the application's global GOT entries were not being run, andEric Andersen
only the global GOT entry relocations for the loaded shared libs were being handled. This made applications segfault when using un-fixedup symbols. After many hours debugging to track down the problem, this patch makes the mips port happy again. -Erik
2004-08-25Joakim Tjernlund writes:Eric Andersen
Hi Manuel & Erik I think I know why MIPS is broken. _dl_perform_mips_global_got_relocations() is broken. It will due to my latest changes reloctate ldso. This function needs to die and its job should be done inside _dl_parse_relocation_information(). It is mostly a copy and paste job, Also PERFORM_BOOTSTRAP_GOT and PERFORM_BOOTSTRAP_RELOCATION should be fixed, they use symbols which aren't passed as arguments. Jocke
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-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-07-30Whitespace cleanupEric Andersen
2004-06-27Joakim Tjernlund writes:Eric Andersen
Hi yet again :) in dl-startup.c when performing boot strap relocation the following test exists to make sure that only "_dl_" symbols are relocated: /* We only do a partial dynamic linking right now. The user is not supposed to define any symbols that start with a '_dl', so we can do this with confidence. */ if (!symname || !_dl_symbol(symname)) { continue; } However on PPC(and the other archs as well I suspect) all symbols are "_dl_" symbols so the test is never true. The test can be removed and the whole loop simplified(smaller). This also makes it possible to simplify elfinterp.c This remove the scanning of ldso.so relocs, making relocation faster. I have tested this on PPC and it works well. Do you think this optimization will work for the other arches as well? I can't see why not. Jocke * Tested on x86, arm, mipsel, and powerpc by Erik and works nicely -Erik
2004-06-19Joakim Tjernlund writes:Eric Andersen
Since MIPS don't have COPY relocs it seems apropiate to define DL_NO_COPY_RELOCS. This will optimize dl_find_hash somewhat.
2004-06-19Joakim Tjernlund writes:Eric Andersen
Glibc does not use COPY class for SHN_COMMOM in MIPS. Make uClibc ldso the same.
2004-05-12Add a local '_dl_errno' to be used by syscalls in ldso, allowingEric Andersen
useful syscall failure diagnostics.
2004-05-11Bradley D. LaRonde, brad at laronde dot org writes:Eric Andersen
If I change that ELF_RTYPE_CLASS_COPY to ELF_RTYPE_CLASS_PLT to tell _dl_find_hash to ignore stubs when resolving undefined functions without stubs, the dlopen tests all pass. dlopen gets a pointer to the libc.so malloc instead of a pointer to the libpthread malloc stub. Yay! :-)
2004-04-20Cope with gcc 3.4's more aggressive persuit of attribute unusedEric Andersen
2004-02-20Patch by Joakim Tjernlund <joakim.tjernlund@lumentis.se>, which gotManuel Novoa III
mips mostly working. From there, I tracked the bash failure to a bad _dl_atexit address and Erik took it from there.
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-14Atsushi Nemoto writes:Eric Andersen
Also, if you are to enable SUPPORT_LD_DEBUG on MIPS, I think this patch is needed too.
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-02-05Fixup a badly merged updateEric Andersen
-Erik
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-08-22Make the mips ld.so debug noise somewhat useful, and less gratuitouslyEric Andersen
different than all other arches. -Erik
2003-06-12Fix mips so it compiles with gcc 3.3Eric Andersen
2003-01-30The original glibc sysdeps/mips/dl-machine.h source from Kazumoto Kojima wasEric Andersen
under the LGPL. I noticed Steven J. Hill has accidentally changed the license to be GPL. Per email with him, change it back to LGPL. Erik Andersen wrote: >I just noticed that uClibc/ldso/ldso/mips/resolve.S is >listed as licensed under the GPL, rather than the LGPL >like the rest of uClibc. Accident? > Yes. Feel free to change it.
2002-11-05Massive scrubbing of the shared lib loader error handling.Eric Andersen
Move all configuration options into the new config system. -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
2002-07-25ldso specific syscalls and userspace syscalls all in one file now."Steven J. Hill"
2002-05-28Patch from Tobias Anderberg <tobias.anderberg@axis.com> to abstractEric Andersen
out page alignment issues. As we we were assuming 4k pages, which need not be the case...
2002-05-20Added more debug code."Steven J. Hill"
2002-05-20Fixed MIPS dynamic linker by removing link order dependency bug."Steven J. Hill"