All,
I have shared module A (e.g. mod_example.so) which gets
loaded by Apache Web Server 1.3.9 running on AIX 4.3. The
handler function of module A makes call to a function from module
B (lets say xyz.so, function is declared as extern "C" abc())
which makes call to ORB_init().
When web server loads the library it fails to call the
constructor for all static variables declared in orb lib, which
causes orb methods to fail. If I replace apache server and write
my own program which loads module A using dlopen() and calls the
handler function using dlsym() everything works fine.
I looked at apache web server code and found that for AIX
platform, web server includes os-aix-dso.c file in os.c file.
os-aix-dso file has implementation if dlopen() which calls load()
to load the shared library. Since load does not initialise the
variable, I even changed it to loadAndInit() but no luck.
summary:
Apache(written in C) -> mod_example.so (written in C) -> xyz.so
(C++ file, has extern function which is declared as c function
using extern "C") -> ORB_init() (C++ shared library).
Any help on above issue will be greatly appreciated.
Thanks
* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!