freebsd-dev/libexec/rtld-elf
John Polstra 44a028c369 Revamp the code that calls shared libraries' init and fini functions.
Formerly the init functions were called in the opposite of the
order in which libraries were loaded, and libraries were loaded
according to a breadth-first traversal of the dependency graph.
That ordering came from SVR4.0, and it was easy to implement but
not always sensible.

Now we do a depth-first walk over the dependency graph and call
the init functions in an order such that each shared object's needed
objects are initialized before the shared object itself.  At the
same time we build a list of finalization (fini) functions in the
opposite order, to guarantee correct C++ destructor ordering whenever
possible.  (It may not be possible if dlopen and dlclose are used
in strange ways, but we come as close as one can come.)

The need for this renovation has become apparent as more programs
have started using multithreading.  The multithreaded C library
libc_r requires initialization, whereas the standard libc does not.
Since virtually every other object depends on the C library, it is
important that it get initialized first.
2000-07-26 04:24:40 +00:00
..
alpha Fix a bug which could cause programs with user threads packages to 2000-07-17 17:18:13 +00:00
amd64 Fix a bug which could cause programs with user threads packages to 2000-07-17 17:18:13 +00:00
i386 Fix a bug which could cause programs with user threads packages to 2000-07-17 17:18:13 +00:00
debug.c
debug.h
Makefile We shouldn't use cp to save the old ld-elf.so.1. Use the sanctioned tool 2000-07-20 08:00:02 +00:00
malloc.c
map_object.c
rtld.1 Only punctuation is an allowed argument type for open-close macros 2000-06-30 06:30:53 +00:00
rtld.c Revamp the code that calls shared libraries' init and fini functions. 2000-07-26 04:24:40 +00:00
rtld.h Revamp the code that calls shared libraries' init and fini functions. 2000-07-26 04:24:40 +00:00
xmalloc.c