Hi,
First where is the best source of documentation over ELF features that
can be used by DSOs ?
I'd like to confirm some points:
* The dynamic linker serializes all invocations to an individual DSOs
.init/.fini pointers (clarification covered in next 3 points).
* That protection is provided between pointers of a single DSOs, i.e.
they are fired in order of the ELF section synchronously.
* That protection is provided between two (or more) independent
threads causing the same DSO to be loaded. i.e. the dynamic linker
provides a mutex around the loading procedure and each user that is
increasing the reference count gets to do their thing in turns.
* This results in the .init/.fini pointers conforming to a
single-threaded model (which is being enforced by the dynamic linker,
even if the outside world is a multi-threaded enviroment).
* That each loading the DSO fires the .init/.fini, meaning each time
the reference count inside the dynamic linker increments we always get
the callbacks fired (for example through dlopen()).
* Does the .init/.fini method have a way of asking the dynamic linker
for its own handle/reference and what information does the dynamic
linker make available through that.
Thanks,
Darryl