This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Shared library annoyance with gcc-3_0-branch
- To: dewar at gnat dot com
- Subject: Re: Shared library annoyance with gcc-3_0-branch
- From: Geert Bosch <bosch at gnat dot com>
- Date: Tue, 20 Feb 2001 13:07:57 -0500 (EST)
- Cc: rth at redhat dot com, torvalds at transmeta dot com, aoliva at redhat dot com,gcc at gcc dot gnu dot org
On Tue, 20 Feb 2001 dewar@gnat.com wrote:
|<<Yes. There must be exactly one copy of the exception handling
|routines in use within a program.
|>>
|
|Why is this the case? It sounds a bit suspicious (in particular, one
|wonders how this can be true, and yet exceptions work fine in a
|multi-threaded environment).
RTH means that only one copy of the code and data must be linked in.
This has nothing to do with multithreading.
This restriction is unfortunate though, since it never was the case that
the gcc library had such state, so it was perfectly fine to have multiple
copies. I really think we should have moved the exception stuff into a
separate library.
Another issue is that calls to dynamically linked library routines
are relatively expensive on some platforms and this is a problem for
targets where we use libgcc for some 64-bit operations. These are
simple subprograms and having expensive calls to them may slow them
down for no good reason.
-Geert