Jeff, the things work fine in HP-UX since gcc 3.3.1 start to support WEAK symbols again. You mean, I have to do the same in Linux? BTW, simple test case is OK in Linux. -----Original Message----- From: Jeffrey A Law [mailto:law@xxxxxxxxxx] Sent: Tuesday, October 12, 2004 7:46 PM To: Lev Assinovsky Cc: Gcc-Help (E-mail) Subject: RE: shared library exception problem! On Tue, 2004-10-12 at 09:39, Lev Assinovsky wrote: > Hi Jeff! > No I didn't run shared library constructor. > What is it? The shared library constructor is responsible for registering the EH regions and running any static ctors for the shared library. It's necessary to call the shared library constructor when using dlopen on hpux. I don't have an HPUX box running at the moment to pull up any code. But the basic idea is to 1. dlopen the library 2. Lookup the shared library's constuctor 3. Call the routine returned by #2. The trick is you have to know the name of the shared library's constructor routine. I don't recall the format offhand, but it does have a well defined format for the name and includes the name of the library. jeff