This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: dlopen/dlclose problems


On Thu, Nov 25, 2010 at 5:46 PM, Andreas Fink
<andreas.fink85@googlemail.com> wrote:
> Is this a bug or intended behaviour (if it is intended can you tell me why?)

It is not a bug. The use dlclose() does not require that the
implementation remove the object from the address space. In fact it
would probably be a waste of time.

POSIX says:
~~~
The use of dlclose() reflects a statement of intent on the part of the
process, but does not create any requirement upon the implementation,
such as removal of the code or symbols referenced by handle. Once an
object has been closed using dlclose() an application should assume
that its symbols are no longer available to dlsym(). All objects
loaded automatically as a result of invoking dlopen() on the
referenced object are also closed.
~~~

Your application shouldn't care if the DSO is removed from the address space.

I will ask you the same question I ask everyone:

What problem are you trying to solve?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]