summaryrefslogtreecommitdiff
path: root/ldso/ldso/powerpc/dl-sysdep.h
AgeCommit message (Collapse)Author
2010-05-09powerpc: Add TLS and NPTL supportKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-03-05Use __always_inline instead of __inline__Carmelo Amoroso
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-09-15- commentary typo fixBernhard Reutner-Fischer
2008-07-23- trim any trailing whitespaceBernhard Reutner-Fischer
2008-07-23- fix inline keywordBernhard Reutner-Fischer
2008-04-24- fixup asm. No object-code changesBernhard Reutner-Fischer
2007-01-05Support SecurePLTs for PowerPC. You need a toolchain that supportsJoakim Tjernlund
config option --enable-secureplt. The assembler must also supports R_PPC_REL16* relocations. gcc 4.1.1 and binutils 2.17 is known to do this.
2006-03-08macro out the /10 operation so arches can have their own versions ... and ↵Mike Frysinger
create some default macros for do_rem/do_div_10 so we dont duplicate the samething in many arch header files
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-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-09-23Make do_rem() safe. From Peter Kjellerstedt.Joakim Tjernlund
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-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-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-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
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-11-08Sigh. I can't type this morning.Eric Andersen
2003-11-08Joakim Tjernlund writes:Eric Andersen
Oops, found another ppc 8xx bug. 8xx CPUs may need this as well to work:
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...
2001-11-12powerpc/elfinterp.c: Powerpc works now. Major rework; most relocsDavid Schleef
should work now. R_PPC_JMP_SLOT correctly being lazily relocated. hash.h: Added a field in elf_resolve to store a ppc-specific address. boot1.c: Added debugging code. Disabled check that fails on powerpc because the string literal requires a reloc that isn't performed. Added check to ignore d_tag if it is out of bounds, as has been observed with powerpc binaries.
2001-07-12Added #ifdef DEBUG where appropriate.David Schleef
Fixed icache clearing during _dl_init_got(). Added a few more reloc types. Added out-of-range check for R_PPC_REL24.
2001-07-12First cut of PowerPC port. It works for hello world, but has lotsDavid Schleef
of debugging information is still there.