unloading dynamically loaded libraries
Jagadish Chandra Prasad
jagadish@icmg.nu
Mon Jul 30 01:36:00 GMT 2001
Hi.,
ÃÂ
ÃÂ I am using Suse linux 2.214 kernal
version
ÃÂ and 2.95.2 gcc version
ÃÂ
ÃÂ I am facing a problem while unloading
dynamically loaded libraries.,
ÃÂ
ÃÂ I am attaching the example programs and the
Makefile.,
ÃÂ Do a make to get the executable and shared
objects libtest1.so libtest2.so
ÃÂ run the executable loadunload to get the
scenario
ÃÂ
ÃÂ I am loading two libraries libtest1.so and
libtest2.so.,
ÃÂ If i unload them in reverse order i.e.,
libtest2.so first andÃÂ libtest1.so next then there is no
problem.,
ÃÂ but if i unload them in the same order i.e.,
libtest1.so first and libtest2.so next then dynamic_cast inside unregister
method defined in test2 is giving segmentation fault.,
ÃÂ
ÃÂ The same scenario is working fine in
solaris.,
ÃÂ I am unable to find out whether its a kernel
bug or gcc bug
ÃÂ The problem might be from
dlclose()
ÃÂ
Please respond on this problem.,
ÃÂ
Regards.,
Jagadish
ÃÂ
ÃÂ
ÃÂ
ÃÂ
ÃÂ
test2.h
Makefile
test.h
test1.cpp
test1.h
test2.cpp
loadunload.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loadunload.cpp
Type: text/x-c++
Size: 2249 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010730/4f2c1972/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 277 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010730/4f2c1972/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.h
Type: text/x-c++
Size: 294 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010730/4f2c1972/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.cpp
Type: text/x-c++
Size: 775 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010730/4f2c1972/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.h
Type: text/x-c++
Size: 166 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010730/4f2c1972/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.cpp
Type: text/x-c++
Size: 775 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010730/4f2c1972/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.h
Type: text/x-c++
Size: 167 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20010730/4f2c1972/attachment-0006.bin>
More information about the Libc-alpha
mailing list