This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Can someone please explain difference between g++ linking and using ld?
- To: gerald dot gryschuk at home dot com (Gerald Gryschuk)
- Subject: Re: Can someone please explain difference between g++ linking and using ld?
- From: hjl at lucon dot org (H.J. Lu)
- Date: Sat, 17 Oct 1998 07:34:34 -0700 (PDT)
- Cc: egcs at cygnus dot com
>
> Hi again.
>
> About a week ago I asked a question about whether exceptions worked from
> within shared libraries on a Redhat 5.1 system. Unfortunately no one
> answered
> so I was going to ask again. Before doing so though instead of
> explicitly using
> the linker ld to produce the shared library I used g++ instead.
> Amazingly or
> not to those who might know why, exceptions work from the shared library
> thus produced. So now my question isn't about whether shared libraries
> and exceptions are compatible. Instead I was wondering if someone could
> please take the time to explain how invoking the linker through g++
> is different than invoking the linker directly.
>
It has become an FAQ item. First, exceptions may not work with shared
libraries on all platforms. I was told HP/UX was one of them. You
are lucky to use an OS with ELF. This paper should answer most of
your questions on shared libraries under ELF.
ftp://sunsite.unc.edu/pub/Linux/GCC/elf.ps.gz
H.J.