summaryrefslogtreecommitdiff
path: root/ldso/ldso/powerpc
AgeCommit message (Collapse)Author
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-10-29Hopefully fix the bug Oleg reported in ↵Joakim Tjernlund
http://uclibc.org/lists/uclibc/2005-October/012809.html This will only fix powerpc. Should be easy to fix the other arches.
2005-09-20forgot MMAP_HAS_6_ARGSJoakim Tjernlund
2005-09-20Make powerpc use sys/syscall.h, instead of defining its own syscalls.Joakim Tjernlund
2005-08-15move arch-specific checks out of shared dl-syscall.h and into arch-specific ↵Mike Frysinger
dl-syscalls.h
2005-07-07rip out all the duplicated debug code and move into a shared fileMike Frysinger
2005-04-03Prepare PowerPC some more for standalone exection of ldso.Joakim Tjernlund
Note that every arch that wants to support standalone execution needs to align its stack pointer in crtX since ldso will adjust the stack pointer when adjusting argc and argv in standalone mode.
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-21Prepare for moving ldso FINI handling to libc by passing _dl_fini. This ↵Joakim Tjernlund
should not break ABI. Minor cleanup as well.
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__
2005-03-10Use DT_RELCONT_IDX to optimize the relocation of R_PPC_RELATIVEJoakim Tjernlund
relocs. All RELA arches can probably copy this. REL archs will have to delete the "+ rpnt->r_addend" from the loop.
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-10-07Remove usage of _dl_parse_copy_information() from generic code.Joakim Tjernlund
Remove definition of _dl_parse_copy_information() for powerpc. Remaining archs can do the same. Make debugging output of "relocation processing: xxx" a bit more sane.
2004-09-23Make do_rem() safe. From Peter Kjellerstedt.Joakim Tjernlund
2004-09-23Make powerpc look more like the other archs.Joakim Tjernlund
2004-09-17Bugfix: Add r_addend to final address. The r_addend is mostly zeroJoakim Tjernlund
but can be nonzero for JMP relocs as well. All Rela arches need to do this, test and send a patch :) Remove unneeded test in R_PPC_COPY.
2004-09-16Don't allow undefined global symbols to pass(all archs needs fixing).Joakim Tjernlund
If you are using buildroot and soft floating point, you may have to rebuild the libm.so library, copy it to staging_dir/lib and rebuild your application. Cleanups as well.
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-18Clean up the _dl_boot code and make it similar to arm and sh.Joakim Tjernlund
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-08-06Joakim Tjernlund writes:Eric Andersen
This patch makes -fpic work for PCC and optimzes the relcation by moving the cache flushing stuff to JMP relocs only. Actually PPCs ldso can only handle small GOT tables(<=8192 entries)anyhow, so it makes little sense to compile PPC with -fPIC. libuClibc shrunk from 340724 to 330780 bytes with -fpic.
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-20Whine about R_PPC_REL24 relocations, and tell people to compileEric Andersen
shared libraries with -fPIC
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-03-18Joakim Tjernlund writes:Eric Andersen
Hi I just noticed that gcc has an "b"(Address base register) operand that will match all "r" registers but r0. It is a better fix then adding r0 to the clobber list. What do you think?
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-31Revert to scope as used by original code for now, just in case.Eric Andersen
I still don't have a good handle on why and when the different scope values should be used.
2004-01-30Joakim Tjernlund writes:Eric Andersen
> Not there yet, but the interfaces are much closer now... > Heading to bed though, since its 5:30am. :-) This works, but I discovered something "funny". For all relocs but COPY you can use scope instead of scope->dyn->symbol_scope and it is much faster to do that. Search for "Funny" in the patch to see what I mean. Probably I probably broke something, please let me know if it works for you too. I think I am done with ldso now. Has been fun and I hope to actually use uClibc/busybox soon in a project. Ohh, there is one thing left, double sized PLT entries, but maybe these aren't needed in uClibc? Sweet dreams Jocke
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.
2004-01-29Joakim Tjernlund writes:Eric Andersen
Here is the cleaned up laze reloc patch. Summary: - Minor cleanup. - disable the "if (finaladdr <= 0x01fffffc || finaladdr >= 0xfe000000)" test since it almost never triggered. - Optimized the lazy relocs handling. Would be great if you could commit ASAP. Jocke
2004-01-29Fixup silly typoEric Andersen
2004-01-29Patch from Joakim Tjernlund:Eric Andersen
Removed R_PPC_NONE and R_PPC_REL24 as these does not seem to be used. Corrected R_PPC_ADDR32 and R_PPC_JMP_SLOT
2004-01-27Patch from Joakim Tjernlund to get rid of an annoying warning.Eric Andersen
2004-01-24Joakim Tjernlund writes:Eric Andersen
Hi again I have done some serious clenup of powerpc/elfinterp.c - Make it look more like glibc. - Performance modifictions. - Fixed a few bugs in _dl_do_reloc(). These seem not to have affected anything, but this how glibc do it. Jocke
2004-01-20Paul Mundt writes:Eric Andersen
The current behavior of the powerpc boot1_arch.h seems somewhat broken. Currently room is made on the stack pointer for the link register, but the link register is never actually pushed onto it. glibc bears the following comments: /* Call _dl_start with one parameter pointing at argc */ mr r3,r1 /* (we have to frob the stack pointer a bit to allow room for _dl_start to save the link register). */ followed by the -16 add to r1. Despite the fact that r1 is modified, the link register is never actually pushed onto r1, thus the adjustment is completely superfluous. There's two possible fixes for this, either saving the link register in the way that glibc does, or getting rid of the r1 adjustment. As I'm not sure if saving the link register will actually break the _dl_boot2 callin, both options will probably want to be played with. The following bit of inline assembly in the attached patch builds cleanly for me with gcc 3.3 on darwin, but I'm not able to test it any further beyond that.
2004-01-20Joakim Tjernlund writes:Eric Andersen
> Is there anything I can do/provide that would assist in the solving of > this problem on PowerPC? I'm still concerned about my lack of flash space... Try this path. It fixes the recent ldso problems for me on my mpc860 board. You should be able to use ldso without the dcbx patch to the kernel now. Please report back. Jocke
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-12-03Henrik Grindal Bakken writes:Eric Andersen
The patch touches a minor (well, not that minor, but perhaps only rarely encountered) bug in the powerpc dynamic linker. The problem is that addi is called in inline assembly, but there is no restriction on the second argument. In powerpc assembler, if the second argument to addi is r0, it is taken as the value 0, not the contents of r0. This happened to me, making the stack pointer 0 on the invocation on the application. The patch is against 0.9.22, but there didn't seem to be any changes to the relevant section in 0.9.23.
2003-12-03Joakim Tjernlund writes:Eric Andersen
This is just a wild guess, but you could try this to see if it fixes Richards problem: