shared libraries

Jim Taylor jimt at aiinet.com
Tue Sep 10 19:27:38 CEST 2002


Host: Solaris 2.5.1
Compiler: gcc 2.95

Problem:
When Python loads the extension and the module goes to create the method
table by calling Py_InitModule(), the information passed as parameters is
not correct. I end up getting an address out of bounds error.

Compilation of the module is done with:
gcc  -shared -fPIC -DPIC -I/usr/local/python1.5/SunOS5/include/python1.5 -I/
core -I. -c  -o ctlr.o ctlr.c
gcc -lposix4  -G -Xlinker --export-dynamic  -shared -o ctlr.so ctlr.o

The loader is loading the module, however, during the init function when
Py_InitModule() is called, a segmentation fault occurs indicating an address
out of bounds error. When I try to print the contents of the module table
from within the initialization function, I also get a segmentation fault, so
the problem is the way in which the module has been loaded. It appears there
is an address space issue, but I don't know how to resolve it.

Ideas anyone?
Thanks
Jim Taylor
jimt at aiinet.com





More information about the Python-list mailing list