summaryrefslogtreecommitdiff
path: root/ldso/ldso/sparc
AgeCommit message (Collapse)Author
2005-08-15move arch-specific checks out of shared dl-syscall.h and into arch-specific ↵Mike Frysinger
dl-syscalls.h
2005-07-08whitespace clean upMike Frysinger
2005-07-08help if i named the var correctly ...Mike Frysinger
2005-07-08dl-debug.h for sparcMike Frysinger
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-16cleanup & standardizeMike Frysinger
2005-03-16add hack like m68k so it *builds* again ... probably needs to be cleaned up ↵Mike Frysinger
like m68k though ...
2005-03-16make it compile againMike Frysinger
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-23Make do_rem() safe. From Peter Kjellerstedt.Joakim Tjernlund
2004-09-23Don't allow undefined global symbols to pass.Joakim Tjernlund
Move COPY relocs back to _dl_do_reloc().
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-08-06Joakim Tjernlund writes:Eric Andersen
PPC32, SPARC32/64 and S390 includes the PLT in its RELA size. This caused ldso to always do unlazy relocation of the JMPRELs. This patch fixes it.
2004-06-12Jakub Bogusz from pld-linux dot org writes:Eric Andersen
Hello, I managed to get ldso (and thus shared linking to uClibc) to work on sparc (actually sparc64 kernel with 32-bit userspace), at least on simple "hello world" program (more complex ones not tested). Some notes on attached patch (against 0.9.26, would require some work to apply on current CVS - but I tested 0.9.26, not CVS): - ELF magic cannot be examined by _dl_strncmp so early, probably because of string constant, like on ppc/mips/sh (note that early SEND_STDERR still crashes when trying to do _dl_strlen - I suppose that string constants require relocation; but adding load_addr didn't help, just ELF header was displayed instead of crash) - mmap() is syscall6 like on ppc/mips/sh, not old i386 mmap() - for generic sparc (i.e. not sparcv8/sparcv9) gcc produces .udiv/.urem calls for unsigned integer / and % operators - so these operations must be avoided. I copied do_rem definition from arm header. But / and % are used also in _dl_simple_ltoa() and _dl_simple_ltoahex(); in ltoahex gcc optimizes it to shifts (but I think it's safer to use shifts explicitly, not rely on optimization...). I changed % in ltoa to do_rem, but as there was no do_div definition, I changed all "%d" specifiers to "%x" to avoid crashes (this changes wouldn't be needed if _dl_simple_ltoa() were fixed to not use division on sparc). - "#define SOLARIS_COMPATIBLE" in ld_sysdep.h broke ldso on Linux because of redefining _dl_linux_resolve only in some places (it was still referenced in INIT_GOT before redefinition). So _dl_linux_resolve redefinition should be moved before INIT_GOT definition or removed. - sparc64 kernel requires mmap() addresses to be aligned to 8192, not 4096, otherwise mmap() call failed - reloc_entry must be shifted by 10, not 12 (I found similar operation in glibc sources) Aside of sparc-specific fixes: - I moved some _dl_dprintf()s inside if(_dl_debug_*) conditions (to avoid debugging messages when LD_DEBUG is not defined) - it seems that there was possible off-by-one in ltoa and ltoahex? they are called with char[22] as 1st argument, and then '\0' is stored in local[22] (_before_ p decrementation)... or am I missing something? If not, fix is included in patch.
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-02-01Jakub Bogusz writes:Eric Andersen
Hello, the attached patch fixes ldso compilation on sparc-linux (at least with sparc32 userland). It was made against uClibc 0.9.21, but it's still OK with 0.9.26. There were three problems: - missing __NR_getpid definition - conflicting prototypes in elfinterp.c - syntax error (missing semicolon) in ldso.c With this patch shared libraries and ldso can be built on sparc. It contains also ldso.c syntax fix for m68k - there was the same mistake two lines earlier; but I didn't test build on m68k.
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.
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-09Link ldso vs libgcc.a and eliminate baggage caused byEric Andersen
not previously linking vs libgcc -Erik
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-08-08Make some strings constEric Andersen
-Erik
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-02Patch from Steven J. Hill <sjhill@realitydiluted.com>:Eric Andersen
I am very pleased to announce that the MIPS dynamic linker/loader for uClibc is now working. It works on big and little endian platforms. A few minor changes were needed to avoid breaking ldd, and since this makes some non-trivial changes, I have tested on x86, arm, and powerpc to be sure thoese arches didn't get broken. Excellent work Steven!
2002-03-19Add new debug target (disabled by default) so that when debugEric Andersen
is on we now default to resolving symbols permanently.. -Erik
2002-03-19Cleanup header files a bit.Eric Andersen
-Erik
2002-03-08Seperate out the symbol resolution debugging, so it doesn't clutterEric Andersen
things up when we don't care about symbol resolution problems. Make the lib loader always look first in the directory where the shared lib loader was found. -Erik
2002-02-17Fix defines so debugging works as expectedEric Andersen
2002-01-25Fix up all non-x86 arches to cope with the latest ldso updateEric Andersen
-Erik
2002-01-11Rework naming for shared lib loader to avoid potentialEric Andersen
nameing conflicts with std header files. -Erik
2001-08-11Begin removing some unnecessary inlining, and fix namingEric Andersen
of _dl_fprintf which should really be _dl_dprintf -Erik
2001-07-13This takes about 6k off the size of the x86 shared lib loader...Eric Andersen
-Erik
2001-07-03Finish up merging the arm port into the main tree.Eric Andersen
2001-06-27Cleanup to not use kernel headers at all.Eric Andersen
-Erik
2001-06-14Yet more ldso cleanups. Be more discriminating about when using inlinesEric Andersen
and when using real functions. Make things be more portable by providing a default C routine to locate the got. -Erik
2001-05-01Yet another major rework. This time around, rework it to no longerEric Andersen
use linux kernel header files. -Erik
2001-04-27I messed up the commentEric Andersen
2001-04-27Yet another large update to ld.so. In this iteration I finally gotEric Andersen
the C based syscalls working, which greatly simplifies what it takes to get new architectures running. -Erik
2001-04-23Initial checkin for ld.so. This is a combination of effort from Manuel NovoaEric Andersen
III and me. I've been working on stripping out arch dependant stuff and replacing it with generic stuff whenever possible. -Erik