summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Make our ELF64 type definitions match standards. In particular thismarcel2005-12-181-8/+8
| | | | | | | | | | | | | means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks
* MFNetBSD: src/libexec/ld.elf_so/arch/sparc64/mdreloc.c 1.26 (partial)marius2005-06-041-1/+1
| | | | | | | Fix an obvious bug in the 64-bit PLT fixup: the SLLX was by 12 bits, when it should be 32. MFC after: 1 month
* Remove these unused files before any other archs include the same bogusjhb2004-11-121-167/+0
| | | | file.
* Add support for Thread Local Storage.dfr2004-08-032-0/+36
|
* Fix the problem that surfaced with the new binutils import on sparc64tmm2004-06-182-3/+6
| | | | | | | | | | | | | | | | | | | | | | (and that is for now being worked around by a binutils patch). The rtld code tested &_DYNAMIC against 0 to see whether rtld itself was built as PIC or not. While the sparc64 MD code did not rely on the preset value of the GOT slot for _DYNAMIC any more due to previous binutils changes, it still used to not be 0, so that this check did work. The new binutils do however initialize this slot with 0. As a consequence, rtld would not properly initialize itself and crash. Fix that by introducing a new macro, RTLD_IS_DYNAMIC, to take the role of this test. For sparc64, it is implemented using the rtld_dynamic() code that was already there. If an architecture does not provide its own implementation, we default to the old check. While being there, mark _DYNAMIC as a weak symbol in the sparc64 rtld_start.S. This is needed in the LDSCRIPT case, which is however not currently supported for want of an actual ldscript. Sanity checked with md5 on alpha, amd64, i386 and ia64.
* Avoid using the global offset table to get the address of _DYNAMIC injake2003-07-042-1/+18
| | | | | | | | | rtld. When _DYNAMIC is referenced normally from C the global offset table is used implicitly, but newer versions of binutils don't initialize it statically in the binary, so this doesn't work until rtld is relocated, which _DYNAMIC is needed for... So, as on other systems with the same problem, we disassemble a call instruction to _DYNAMIC in order to get its address.
* Allow threading libraries to register their own lockingkan2003-05-293-33/+23
| | | | | | | | | | implementation in case default one provided by rtld is not suitable. Consolidate various identical MD lock implementation into a single file using appropriate machine/atomic.h. Approved by: re (scottl)
* No need to zero fill memory, mmapped anonymously. Kernel willkan2003-03-141-2/+0
| | | | | | return pre-zeroed pages itself. Noticed by: jake
* Fix rtld to handle SPARC_R_UA{16,64} relocations correctly.kan2002-12-051-2/+2
| | | | Approved by: re (rwatson)
* Fix the handling of high PLT entries (> 32764) on sparc64. This requirestmm2002-11-183-200/+222
| | | | | | | | additional arguments to reloc_jmpslot(), which is why MI code and MD code of other platforms had to be changed. Reviewed by: jake Approved by: re
* <machine/atomic.h> requires <sys/types.h>.ru2002-10-092-2/+1
| | | | Reviewed by: jake, mike
* Return an error if a symbol is not found in reloc_jmpslots() instead oftmm2002-09-141-0/+2
| | | | crashing.
* Add END markers to asm functions so that debuggers can find their size.jake2002-07-171-1/+3
|
* Remove the nanosleep calls from the spin loops in the locking code.jdp2002-07-061-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They provided little benefit (if any) and they caused some problems in OpenOffice, at least in post-KSE -current and perhaps in other environments too. The nanosleep calls prevented the profiling timer from advancing during the spinloops, thereby preventing the thread scheduler from ever pre-empting the spinning thread. Alexander Kabaev diagnosed this problem, Martin Blapp helped with testing, and Matt Dillon provided some helpful suggestions. This is a short-term fix for a larger problem. The use of spinlocking isn't guaranteed to work in all cases. For example, if the spinning thread has higher priority than all other threads, it may never be pre-empted, and the thread holding the lock may never progress far enough to release the lock. On the other hand, spinlocking is the only locking that can work with an arbitrary unknown threads package. I have some ideas for a much better fix in the longer term. It would eliminate all locking inside the dynamic linker by making it safe for symbol lookups and lazy binding to proceed in parallel with a call to dlopen or dlclose. This means that the only mutual exclusion needed would be to prevent multiple simultaneous calls to dlopen and/or dlclose. That mutual exclusion could be put into the native pthreads library. Applications using foreign threads packages would have to make their own arrangements to ensure that they did not have multiple threads in dlopen and/or dlclose -- a reasonable requirement in my opinion. MFC after: 3 days
* Add needed include of mman.h to fix sparc64 buildworld.jake2002-06-241-1/+3
|
* The last bits of the alloca -> mmap fix. IA64 and SPARC64 (current only).dillon2002-06-221-4/+15
| | | | | | | | Untested (testing request went unanswered), but sparc64 is not expected to cause problems. IA64 is not expected to cause problems but the patch was slightly more complex so the possibility exists. Approved by: jdp
* rtld support for sparc64.jake2002-03-135-0/+1073
Largely obtained from: netbsd Submitted by: jake, tmm
OpenPOWER on IntegriCloud