This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Requirements for throwning C++ exceptions from one shared library to another in gcc 4.1.0?


 Good morning Eljay, 

> -----Original Message-----
> From: John (Eljay) Love-Jensen 
> Sent: Thursday, January 11, 2007 5:51 AM
> To: Glenn Serre; MSX to GCC
> Subject: Re: Requirements for throwning C++ exceptions from 
> one shared library to another in gcc 4.1.0?
> 
> Hi Glenn,
> 
> What platform?  IIRC, some platforms do not support throwing 
> from one shared
> library to another.
> 

Sorry, the platforms are x86 Linux and sparc Sun Solaris (with gcc 3.2).


> For example, as I recall, one platform that did not support 
> throwing across
> shared libraries was Sun Solaris.  (Maybe that's supported now.)
> 

Uh, oh.  Well, we'll be giving it a try here.  I'll post the results.  

[...] 

> 3. you must make sure you are not trying to throw an 
> exception over a C
> barrier.  That just won't work, since the stack won't have 
> the EH unwinding
> support, and your application will terminate posthaste.
> 

By C barrier here, do you mean code compiled as C (i.e. with gcc instead
of g++) or would that include an extern "C" function in C++ code (just
checking).  


[...]

FYI, Current experiments on x86 Linux indicate that linking libstdc++
and libgcc statically (in one shared library) seems to work except for a
few cases.  Linking libstdc++ and libgcc shared seems to work in all
cases.  

Thanks!
--Glenn S.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]