Commit Graph

9 Commits

Author SHA1 Message Date
Alexander Kabaev
f94cc7e9ca Fix rtld to handle SPARC_R_UA{16,64} relocations correctly.
Approved by:	re (rwatson)
2002-12-05 16:58:31 +00:00
Thomas Moestl
a42a42e9b9 Fix the handling of high PLT entries (> 32764) on sparc64. This requires
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
2002-11-18 22:08:50 +00:00
Ruslan Ermilov
2908cc64eb <machine/atomic.h> requires <sys/types.h>.
Reviewed by:	jake, mike
2002-10-09 20:20:43 +00:00
Thomas Moestl
a4823075e5 Return an error if a symbol is not found in reloc_jmpslots() instead of
crashing.
2002-09-14 12:14:24 +00:00
Jake Burkholder
b1d6ef2ee9 Add END markers to asm functions so that debuggers can find their size. 2002-07-17 22:20:41 +00:00
John Polstra
e6f0183bff Remove the nanosleep calls from the spin loops in the locking code.
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
2002-07-06 20:25:56 +00:00
Jake Burkholder
cf85da5c68 Add needed include of mman.h to fix sparc64 buildworld. 2002-06-24 05:23:46 +00:00
Matthew Dillon
b6801e6b54 The last bits of the alloca -> mmap fix. IA64 and SPARC64 (current only).
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
2002-06-22 18:36:21 +00:00
Jake Burkholder
e4c9dc6770 rtld support for sparc64.
Largely obtained from:	netbsd
Submitted by:	jake, tmm
2002-03-13 02:40:39 +00:00