This is the mail archive of the gcc@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]

Re: Can someone please explain difference between g++ linking and using ld?


> 
> 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.


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