This is the mail archive of the gcc-bugs@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: g++-mike-eh8-C test failure


>  > Building a shared libgcc is a good idea on its own.  However, it might
>  > not resolve this problem.  There still might be duplication of procedures
>  > and problems with libraries that don't have a shared implementation.
> 
> Why would there be duplication?

This is what the HP-UX Linker and Libraries Online User Guide says about the
subject:

Summary of Mixing Shared and Archive Libraries

Applications that depend on shared libraries should not use archive libraries
to satisfy symbol imports in a shared library. This suggests that only a
shared version of libc should be used in applications using shared
libraries. If an archive version of a dependent library must be used, all of its
definitions should be explicitly exported with the -E or +e options to the
linker to avoid multiple definitions.

Providers of shared libraries should make every effort to prevent these
kinds of problems. In particular, if a shared library provider allows
unsatisfied symbols to be satisfied by an archive version of libc, the
application that uses the library may fail if the shared library is later
updated and any new libc dependencies are introduced. New dependencies in
shared libraries can be satisfied by maintaining accurate dependency lists.
However, this can lead to multiple occurrences of the same definition in an
application if the definitions are not explicitly exported.


Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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