#
d3980376 |
| 27-Dec-1999 |
John Polstra <jdp@FreeBSD.org> |
Add a new function dllockinit() for registering thread locking functions to be used by the dynamic linker. This can be called by threads packages at start-up time. I will add the call to libc_r soo
Add a new function dllockinit() for registering thread locking functions to be used by the dynamic linker. This can be called by threads packages at start-up time. I will add the call to libc_r soon.
Also add a default locking method that is used up until dllockinit() is called. The default method works by blocking SIGVTALRM, SIGPROF, and SIGALRM in critical sections. It is based on the observation that most user-space threads packages implement thread preemption with one of these signals (usually SIGVTALRM).
The dynamic linker has never been reentrant, but it became less reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c". Starting with that revision, multiple threads each doing lazy binding could interfere with each other. The usual symptom was that a symbol was falsely reported as undefined at start-up time. It was rare but not unseen. This commit fixes it.
show more ...
|
Revision tags: release/3.4.0_cvs, release/3.3.0_cvs |
|
#
7f3dea24 |
| 28-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
#
962fdc46 |
| 25-Jun-1999 |
John Polstra <jdp@FreeBSD.org> |
Fix a serious performance bug for large programs on the Alpha, discovered by Hidetoshi Shimokawa. Large programs need multiple GOTs. The lazy binding stub in the PLT can be reached from any of thes
Fix a serious performance bug for large programs on the Alpha, discovered by Hidetoshi Shimokawa. Large programs need multiple GOTs. The lazy binding stub in the PLT can be reached from any of these GOTs, but the dynamic linker only has enough information to fix up the first GOT entry. Thus calls through the other GOTs went through the time-consuming lazy binding process on every call.
This fix rewrites the PLT entries themselves to bypass the lazy binding.
Tested by Hidetoshi Shimokawa and Steve Price.
Reviewed by: Doug Rabson <dfr@freebsd.org>
show more ...
|
Revision tags: release/3.2.0 |
|
#
d5b537d0 |
| 09-Apr-1999 |
John Polstra <jdp@FreeBSD.org> |
Eliminate all machine-dependent code from the main source body and the Makefile, and move it down into the architecture-specific subdirectories.
Eliminate an asm() statement for the i386.
Make the
Eliminate all machine-dependent code from the main source body and the Makefile, and move it down into the architecture-specific subdirectories.
Eliminate an asm() statement for the i386.
Make the dynamic linker work if it is built as an executable instead of as a shared library. See i386/Makefile.inc to find out how to do it. Note, this change is not enabled and it might never be enabled. But it might be useful in the future. Building the dynamic linker as an executable should make it start up faster, because it won't have any relocations. But in practice I suspect the difference is negligible.
show more ...
|
Revision tags: release/3.1.0, release/3.0.0, release/2.2.8 |
|
#
13575fc4 |
| 04-Sep-1998 |
Doug Rabson <dfr@FreeBSD.org> |
Add alpha support.
Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me) Obtained from: Probably NetBSD
|
Revision tags: release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0 |
|
#
c0d2338c |
| 28-Mar-2006 |
David Xu <davidxu@FreeBSD.org> |
Allocate space for thread pointer, this allows thread library to access its pointer from begin, and simplifies _get_curthread() in libthr.
|
#
0eb88f20 |
| 18-Dec-2005 |
Alexander Kabaev <kan@FreeBSD.org> |
Implement ELF symbol versioning using GNU semantics. This code aims to be compatible with symbol versioning support as implemented by GNU libc and documented by http://people.redhat.com/~drepper/symb
Implement ELF symbol versioning using GNU semantics. This code aims to be compatible with symbol versioning support as implemented by GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0.
Implement dlvsym() function to allow lookups for a specific version of a given symbol.
show more ...
|
#
55dfaa91 |
| 18-Dec-2005 |
Marcel Moolenaar <marcel@FreeBSD.org> |
Explicitly cast ELF_R_TYPE() to the right type.
|
Revision tags: release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0 |
|
#
017246d0 |
| 03-Aug-2004 |
Doug Rabson <dfr@FreeBSD.org> |
Add support for Thread Local Storage.
|
Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0 |
|
#
6143d8ba |
| 12-Dec-2003 |
Peter Wemm <peter@FreeBSD.org> |
Fix dynamic linking a bit more.. enough that mozilla-firebird works if you dig up the patches for amd64 support for it.
Note to self: do not put a 64 bit value in a 32 bit space.
|
Revision tags: release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0 |
|
#
9783a12b |
| 24-May-2003 |
Peter Wemm <peter@FreeBSD.org> |
Initial pass at supporting shared libraries on amd64. There are still a few missing relocation types in amd64/reloc.c, but I have not found any of them in use yet. :-)
Approved by: re (amd64/* bla
Initial pass at supporting shared libraries on amd64. There are still a few missing relocation types in amd64/reloc.c, but I have not found any of them in use yet. :-)
Approved by: re (amd64/* blanket)
show more ...
|
Revision tags: release/4.8.0_cvs, release/4.8.0 |
|
#
605f36fc |
| 14-Mar-2003 |
Alexander Kabaev <kan@FreeBSD.org> |
No need to zero fill memory, mmapped anonymously. Kernel will return pre-zeroed pages itself.
Noticed by: jake
|
Revision tags: release/5.0.0_cvs, release/5.0.0 |
|
#
a42a42e9 |
| 18-Nov-2002 |
Thomas Moestl <tmm@FreeBSD.org> |
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:
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
show more ...
|
Revision tags: release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
b08440e5 |
| 10-Jun-2002 |
Matthew Dillon <dillon@FreeBSD.org> |
Correct a bug in the last commit. The whole point of creating a 'done:' goto target was so the cache could be freed. So free the cache after done: rather then before done: (!)
Submitted by: Gavin
Correct a bug in the last commit. The whole point of creating a 'done:' goto target was so the cache could be freed. So free the cache after done: rather then before done: (!)
Submitted by: Gavin Atkinson <gavin@ury.york.ac.uk>
show more ...
|
#
b603db30 |
| 10-Jun-2002 |
Matthew Dillon <dillon@FreeBSD.org> |
In tracking down an installation seg fault with then openoffice port Martin Blapp determined that the elf dynamic loader was at fault. In particular, the loader uses alloca() to allocate a symbol ca
In tracking down an installation seg fault with then openoffice port Martin Blapp determined that the elf dynamic loader was at fault. In particular, the loader uses alloca() to allocate a symbol cache on the stack. Normally this would work just fine, but if the loader is called from a threaded program and the object being loaded is fairly large the alloca() can blow away the thread stack and effect other nearby thread stacks as well. My testing showed that the symbol cache can be as large as 250KBytes during the openoffice port build and install sequence. Martin was able to work around the problem by disabling the symbol cache (cache = NULL;). However, this solution is not adequate for commit because it can cause an enormous cpu burden for applications which do a lot of dynamic loading (e.g. like konqueror).
The solution is to use anonymous mmap() to temporarily allocate space to hold the symbol cache. In testing I found that replacing the alloca() with mmap() has no observable degredation in performance.
It should be noted that this bug does not necessarily cause an immediate crash but can instead result in long term corruption and instability in applications that load modules from threads. The bug is almost certainly responsible for some of the instabilities found in konqueror, for example, and possibly netscape too.
Sleuthing work by: Martin Blapp <mb@imp.ch> X-MFC after: Before or after the 4.6 release depending on the release engineers
show more ...
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
b5393d9f |
| 15-Oct-2001 |
Doug Rabson <dfr@FreeBSD.org> |
Add ia64 support. Various adjustments were made to existing targets to cope with a few interface changes required by the ia64. In particular, function pointers on ia64 need special treatment in rtld.
|
#
c15e7faa |
| 06-May-2001 |
John Polstra <jdp@FreeBSD.org> |
Performance improvements for the ELF dynamic linker. These particularly help programs which load many shared libraries with a lot of relocations. Large C++ programs such as are found in KDE are a p
Performance improvements for the ELF dynamic linker. These particularly help programs which load many shared libraries with a lot of relocations. Large C++ programs such as are found in KDE are a prime example.
While relocating a shared object, maintain a vector of symbols which have already been looked up, directly indexed by symbol number. Typically, symbols which are referenced by a relocation entry are referenced by many of them. This is the same optimization I made to the a.out dynamic linker in 1995 (rtld.c revision 1.30).
Also, compare the first character of a sought-after symbol with its symbol table entry before calling strcmp().
On a PII/400 these changes reduce the start-up time of a typical KDE program from 833 msec (elapsed) to 370 msec.
MFC after: 5 days
show more ...
|
Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs, release/4.1.0, release/3.5.0_cvs, release/4.0.0_cvs |
|
#
7dbe16fb |
| 29-Jan-2000 |
John Polstra <jdp@FreeBSD.org> |
When a threads package registers locking methods with dllockinit(), figure out which shared object(s) contain the the locking methods and fully bind those objects as if they had been loaded with LD_B
When a threads package registers locking methods with dllockinit(), figure out which shared object(s) contain the the locking methods and fully bind those objects as if they had been loaded with LD_BIND_NOW=1. The goal is to keep the locking methods from requiring any lazy binding. Otherwise infinite recursion occurs in _rtld_bind.
This fixes the infinite recursion problem in the linuxthreads port.
show more ...
|
#
d3980376 |
| 27-Dec-1999 |
John Polstra <jdp@FreeBSD.org> |
Add a new function dllockinit() for registering thread locking functions to be used by the dynamic linker. This can be called by threads packages at start-up time. I will add the call to libc_r soo
Add a new function dllockinit() for registering thread locking functions to be used by the dynamic linker. This can be called by threads packages at start-up time. I will add the call to libc_r soon.
Also add a default locking method that is used up until dllockinit() is called. The default method works by blocking SIGVTALRM, SIGPROF, and SIGALRM in critical sections. It is based on the observation that most user-space threads packages implement thread preemption with one of these signals (usually SIGVTALRM).
The dynamic linker has never been reentrant, but it became less reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c". Starting with that revision, multiple threads each doing lazy binding could interfere with each other. The usual symptom was that a symbol was falsely reported as undefined at start-up time. It was rare but not unseen. This commit fixes it.
show more ...
|
Revision tags: release/3.4.0_cvs, release/3.3.0_cvs |
|
#
7f3dea24 |
| 28-Aug-1999 |
Peter Wemm <peter@FreeBSD.org> |
$Id$ -> $FreeBSD$
|
#
962fdc46 |
| 25-Jun-1999 |
John Polstra <jdp@FreeBSD.org> |
Fix a serious performance bug for large programs on the Alpha, discovered by Hidetoshi Shimokawa. Large programs need multiple GOTs. The lazy binding stub in the PLT can be reached from any of thes
Fix a serious performance bug for large programs on the Alpha, discovered by Hidetoshi Shimokawa. Large programs need multiple GOTs. The lazy binding stub in the PLT can be reached from any of these GOTs, but the dynamic linker only has enough information to fix up the first GOT entry. Thus calls through the other GOTs went through the time-consuming lazy binding process on every call.
This fix rewrites the PLT entries themselves to bypass the lazy binding.
Tested by Hidetoshi Shimokawa and Steve Price.
Reviewed by: Doug Rabson <dfr@freebsd.org>
show more ...
|
Revision tags: release/3.2.0 |
|
#
d5b537d0 |
| 09-Apr-1999 |
John Polstra <jdp@FreeBSD.org> |
Eliminate all machine-dependent code from the main source body and the Makefile, and move it down into the architecture-specific subdirectories.
Eliminate an asm() statement for the i386.
Make the
Eliminate all machine-dependent code from the main source body and the Makefile, and move it down into the architecture-specific subdirectories.
Eliminate an asm() statement for the i386.
Make the dynamic linker work if it is built as an executable instead of as a shared library. See i386/Makefile.inc to find out how to do it. Note, this change is not enabled and it might never be enabled. But it might be useful in the future. Building the dynamic linker as an executable should make it start up faster, because it won't have any relocations. But in practice I suspect the difference is negligible.
show more ...
|
Revision tags: release/3.1.0, release/3.0.0, release/2.2.8 |
|
#
13575fc4 |
| 04-Sep-1998 |
Doug Rabson <dfr@FreeBSD.org> |
Add alpha support.
Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me) Obtained from: Probably NetBSD
|