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