Bug in dlopen using static objects ?
Arthur Rother
arthur.rother@ovidius.com
Wed Dec 9 08:30:00 GMT 1998
Hello,
I am not sure if I got the right recipient for the problem I am encountering,
nor am I sure it is a bug.
I experience this problem using egcs both on sun workstations, as well on
linux.
The main problem is:
I am loading a library using the dlopen call from the dl library.
In the dynamic loaded library I call a function, which constructs a static
object, which implements amongst others a destructor.
After a call to dlclose, this object is not destroyed. On terminating the
program, it does try to destroy the object, but the reference to the
destructor member of that object is ofcourse invalid (since the library was
freed).
Is this a bug or am I using the wrong compiler/linker options or arguments
to dlopen. If there is a workaround, I would be thankfull for information.
If egcs is the wrong recipient, I would like to know the adress of the
right recipient (the authors of the dl library).
Attached is a sample project, with which the error should be reproducable.
With best Regards
Arthur Rother
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-static-in-dll-error.tgz
Type: application/x-gzip
Size: 866 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19981209/dde61831/attachment.bin>
More information about the Gcc-bugs
mailing list