[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared libs.



Hi Wolfgang,

> It could be done even simpler than that: As the data section of a
> shared library must exist separately in each process, we can allocate
> its space already at link time (not at load time). The stub routines
> are then called with the base pointer to the memory in the process'
> bss area.

Not possible. A function in a shared module may call a function in
a different module, which also requires some static storage. At link
time you don't know about that. You only know which functions are
directly called by the application. And of course the function
from moduleA would not know the base address for a function in
moduleB.

> This avoids any reentrancy problems. It also avoids the need
> to deallocate any of the shared library's data sections when the
> program is finished.


Waldi