dlopen/dlclose problems
Carlos O'Donell
carlos@systemhalted.org
Sat Nov 27 15:47:00 GMT 2010
On Sat, Nov 27, 2010 at 10:13 AM, Andreas Fink
<andreas.fink85@googlemail.com> wrote:
>> What problem are you trying to solve?
>>
>
> I have a libraries which contain algorithms (for image processing, but that's not important here).
> And I have a program which can use these algorithms from the libraries. Now I'm developing a new algorithm and recompile one of
> my libraries. Of course I do not want to close my program, but just tell it, to reload the library.
>
> Basically my intention is to reopen a library since it has changed on the harddisk, and use the brand new algorithms in there,
> without the need of closing my program.
>
Please keep libc-help in the CC, it helps others learn.
What problem are you trying to solve?
You have described how your application works, but not the problem.
I just tried a *simple* test application that does the following:
* dlopen
* dlsym
* call symbol, received first result set.
* dlclose
* sleep
While the application slept I changed the shared library implementation.
* application returns from sleep
* dlopen
* dlsym
* call symbol, received second result set.
* dlclose
* exit.
The dynamic loader correctly reloaded the library after it changed.
If this basic functionality was broken we would not be able to
implement plugins on GNU/Linux.
If you have a problem then you need to describe the problem.
If you are interested in learning then ask a question :-)
Cheers,
Carlos.
More information about the Libc-help
mailing list