This is the mail archive of the
mailing list for the Cygwin project.
Re: [GCC 3.2] dll/exe exceptions patch
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: Robert Collins <rbcollins at cygwin dot com>
- Cc: cygwin-apps <cygwin-apps at cygwin dot com>
- Date: Thu, 1 Aug 2002 12:35:53 +1000 (EST)
- Subject: Re: [GCC 3.2] dll/exe exceptions patch
> I'd like to provide feedback, but am short of cycles myself. Can you
> describe what it does? I can likely tell any (obvious) collisions with
> cygwin from that.
For mingw (without a special EH dll):
The patch uses the win32api FindAtom/AddAtom functions to create/find a local
ATOM for an app.
In the atom api, the atom string is case insensitive. This is used to
advantage. The string is coded so that 1=uppercase, 0=lowercase. En/decoding
the 'binary' string to a long int, cast to a void*, allows common access to
malloc'd array that contains the addresses of EH objects. The main .exe adds
the local atom (and define the eh globals in the exe address space). Dlls
find the local atom. They all use the same addresses when unwinding. So no
problems with crossing dll/exe boundaries.
Not very well explained. The patch itself tells the story though.
The concept may be usefully extended to other 'shared' globals. I'm looking at
The above works for cygwin too. There may be a better way that avoids the
> ATTACHMENT part 2 application/pgp-signature name=signature.asc
http://digital.yahoo.com.au - Yahoo! Digital How To
- Get the best out of your PC!