| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Notes:
svn path=/head/; revision=104954
|
|
|
|
|
|
|
| |
Reviewed by: jake, mike
Notes:
svn path=/head/; revision=104724
|
|
|
|
|
|
|
| |
crashing.
Notes:
svn path=/head/; revision=103315
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the DT_IA64_PLT_RESERVE dynamic table entry. When a shared object
does not have any PLT relocations, the linker apparently doesn't find
it necessary to actually reserve the space for the BOR (Bind On
Reference) entries as pointed to by the DTE. As a result, relocatable
data in the PLT was overwritten, causing some unexpected control flow
with annoyingly predictable outcome: coredump.
To reproduce:
% echo 'int main() { return 0; }' > foo.c
% cc -o foo foo.c -lxpg4
Notes:
svn path=/head/; revision=102249
|
|
|
|
|
|
|
| |
Reviewed by: jdp
Notes:
svn path=/head/; revision=102235
|
|
|
|
|
|
|
|
|
| |
This relocation creates a function descriptor at the specified
address and is commonly used for C++ to create virtual function
tables.
Notes:
svn path=/head/; revision=102155
|
|
|
|
|
|
|
|
|
|
|
| |
objects' reference counts. This function is called by the atexit
mechanism at program shutdown. I don't think the locking is necessary
here. It caused OpenOffice builds to hang more often than not.
Credit to Martin Blapp and Matt Dillon for helping to diagnose this
problem and for testing the fix.
Notes:
svn path=/head/; revision=101532
|
|
|
|
| |
Notes:
svn path=/head/; revision=100265
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=99506
|
|
|
|
| |
Notes:
svn path=/head/; revision=99500
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
matching constraints where appropriate. This makes the dynamic
linker buildable at -O0 again.
Thanks to Bruce Evans for identifying the cause of the build
problem.
MFC after: 1 week
Notes:
svn path=/head/; revision=98786
|
|
|
|
| |
Notes:
svn path=/head/; revision=98724
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=98629
|
|
|
|
|
|
|
|
|
|
|
| |
tested the patch on -stable.
Reviewed by: obrien
Approved by: jdp
MFC after: 3 days
Notes:
svn path=/head/; revision=98382
|
|
|
|
|
|
|
|
|
| |
by me first have given me a good excuse to drop my MAINTAINERship.
MFC after: 1 week
Notes:
svn path=/head/; revision=98104
|
|
|
|
|
|
|
|
|
|
| |
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>
Notes:
svn path=/head/; revision=98103
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=98100
|
|
|
|
|
|
|
| |
Submitted by: ru
Notes:
svn path=/head/; revision=97026
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Set st_shndx for sym_zero to SHN_UNDEF instead of SHN_ABS.
This gives us something to reliably test against.
o For weak references to undefined sysmbols (as indicated by
having st_shndx equals SHN_UNDEF) in the context of OPDs,
the address of the OPD is to be zero, not the address of
the function it contains.
o For weak references to undefined symbols in all other cases
(only DIR64LSB at this time), the actual relocated value is
to be zero, not the value prior to relocating.
Roughly speaking, weak references to undefined symbols are no-ops.
Tested on: i386, ia64
Notes:
svn path=/head/; revision=95544
|
|
|
|
|
|
|
| |
binding works for local symbols. Remove the workaround...
Notes:
svn path=/head/; revision=95540
|
|
|
|
|
|
|
|
|
|
|
| |
relocation identifies the symbol to which we need to bind. This
solves a problem seen on ia64 where the symbol hash table does not
contain local symbols and thus resulted in unresolved symbols.
Tested on: alpha, i386, ia64
Notes:
svn path=/head/; revision=95539
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
objects were not being correctly set to zero. Instead, the function
descriptor pointer was set to the load address of the .so object. This
caused gcc generated binaries to segfault on exit when crtbegin.asm's
_fini code tested the __cxa_finalize() function pointer for zero.
This is a bit of a hack because of a problem nearby workaround for
find_symdef and its quirks (failures) for local symbols. This still
needs to be fixed.
Notes:
svn path=/head/; revision=94021
|
|
|
|
|
|
|
|
| |
Approved by: jdp
Tested on: alpha, i386, sparc64
Notes:
svn path=/head/; revision=93610
|
|
|
|
|
|
|
|
| |
Largely obtained from: netbsd
Submitted by: jake, tmm
Notes:
svn path=/head/; revision=92195
|
|
|
|
|
|
|
|
|
| |
PR: bin/25059
Approved by: jdp
MFC after: 3 weeks
Notes:
svn path=/head/; revision=91444
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
produced by ld(8) (ie: that _DYNAMIC immediately follows the _GOT).
The new binutils import changed that, and the intial GOT relocation
broke. Use a custom linker script to provide a real end-of-GOT symbol.
Update ld.so to deal with the new (faster) PLT format that gcc-3.1 and
binutils can produce.
This is probably incomplete, but appears to be working again.
Obtained from: NetBSD
(And a fix to a silly mistake that I made by: gallatin)
Notes:
svn path=/head/; revision=90826
|
|
|
|
|
|
|
|
|
|
|
| |
non-empty string in the environment; we indicate which objects caused
each object to be loaded.
PR: 30908
Submitted-by: Mike Meyer <mwm@mired.org>
Notes:
svn path=/head/; revision=90755
|
|
|
|
| |
Notes:
svn path=/head/; revision=90172
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=90162
|
|
|
|
|
|
|
|
|
|
| |
all others.
PR: bin/28191
MFC after: 2 weeks
Notes:
svn path=/head/; revision=89783
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t).
This makes us more consistant with NetBSD and standards which include
these functions. Bruce pointed out that ptrdiff_t would probably
have been better than intptr_t, but this doesn't match other
implimentations.
Also remove local declarations of sbrk and unnecessary casting.
PR: 32296
Tested by: Harti Brandt <brandt@fokus.gmd.de>
MFC after: 1 month
Notes:
svn path=/head/; revision=89732
|
|
|
|
| |
Notes:
svn path=/head/; revision=89230
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DT_INIT and DT_FINI tags pointed to fptr records. In 2.11.2, it points
to the actuall address of the function. On IA64 you cannot just take
an address of a function, store it in a function pointer variable and
call it.. the function pointers point to a fptr data block that has the
target gp and address in it. This is absolutely necessary for using
the in-tree binutils toolchain, but (unfortunately) will not work with
old shared libraries. Save your old ld-elf.so.1 if you want to use
old ones still. Do not mix-and-match.
This is a no-op change for i386 and alpha.
Reviewed by: dfr
Notes:
svn path=/head/; revision=85677
|
|
|
|
| |
Notes:
svn path=/head/; revision=85676
|
|
|
|
|
|
|
|
| |
cope with a few interface changes required by the ia64. In particular,
function pointers on ia64 need special treatment in rtld.
Notes:
svn path=/head/; revision=85004
|
|
|
|
|
|
|
|
|
|
|
| |
fixes the problem and improves startup times for large applications such
as KDE2 considerably.
Reviewed by: jdp
MFC after: 1 week
Notes:
svn path=/head/; revision=84746
|
|
|
|
|
|
|
|
|
|
| |
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
Notes:
svn path=/head/; revision=81251
|
|
|
|
|
|
|
|
|
|
| |
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.
Submitted by: David Hill <david@phobia.ms>
Notes:
svn path=/head/; revision=80381
|
|
|
|
| |
Notes:
svn path=/head/; revision=79529
|
|
|
|
| |
Notes:
svn path=/head/; revision=79454
|
|
|
|
| |
Notes:
svn path=/head/; revision=79366
|
|
|
|
| |
Notes:
svn path=/head/; revision=77348
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
Notes:
svn path=/head/; revision=76296
|
|
|
|
|
|
|
|
|
|
|
| |
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.
This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.
Notes:
svn path=/head/; revision=76224
|
|
|
|
|
|
|
| |
- MAN[1-9] -> MAN.
Notes:
svn path=/head/; revision=74814
|
|
|
|
| |
Notes:
svn path=/head/; revision=71099
|
|
|
|
|
|
|
| |
got an assert failure in the dynamic linker.
Notes:
svn path=/head/; revision=70677
|
|
|
|
| |
Notes:
svn path=/head/; revision=70227
|
|
|
|
|
|
|
| |
Use _PATH_* where where possible.
Notes:
svn path=/head/; revision=69793
|
|
|
|
|
|
|
|
|
|
| |
The function's callers generate the error message when appropriate.
This eliminates the message ``Undefined symbol "__register_frame_info"''
which was bogusly returned by dlerror() in some cases.
Notes:
svn path=/head/; revision=68458
|