Hi
I have written a Linux ODBC xpcom modules for mozilla 1.7+. The problem is when I load my xpcom modules the unixODBC library is linked, but when I open a database connection, the odbc driver is loaded and has the same function names. This causes my modules to jump to the functions in the driver not to the driver manager functions. The ODBC people wrote a reply to me stating:
--------------------------------------------------------------- > Hi > > I traced through the loading of the libraries. before I do SQLConnect > the odbcpsql library is not accessable. After I execute SQLConnect the > odbcpsql library is loaded. > > Now when I execute SQLExecDirect() the loader ld-linux.so.2 does a > string compair with the name SQLExecDirect and the libraries that are > loaded. > > Because odbcpsql is loaded after odbc library the search finds the > SQLExecDirect of the odbcpsql before SQLExecDirect in odbc. > > This problem only happens under Mozilla. When I do a standalone test it > works. > > shaun
This is most likely down to the dlopen flags Mozilla uses to dlopen libodbc.so.
It should be using something like RTLD_GROUP or you will get the bahavior you
describe.
The driver manager dlopens the postgres driver with the correct flags and calls
dlsym for all the ODBC APIs in the driver. From then on the DM calls using the
addresses that come back from dlsym. Mozilla needs to do the same.
Basically, you need to look at how mozilla dlopens libodbc.so. -------------------------------------------------------------------------
What are the dlopen flags the mozilla uses?
shaun _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
