This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problems building shared libraries under Irix6
- To: Lee Iverson <leei at ai dot sri dot com>
- Subject: Re: Problems building shared libraries under Irix6
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 16 Dec 1997 17:19:34 -0700
- Cc: egcs at cygnus dot com
- Reply-To: egcs at cygnus dot com
In message <199712161724.JAA25082@Canada.AI.SRI.COM>you write:
>
> All of the discussion wrt. __register_frame under Linux (mostly on
> gcc2 with spillover here) begs an important question: why is libgcc.a
> linked in when building shared libraries? Under Irix 6.x, this
> inclusion on the link line seems to break shared libraries
> completely. They can no longer be linked against since
> __register_frame was included.
The shared library needs to be self-contained as far as functions for
internal use are concerned.
Consider __muldi3 for 64bit multiplies.
If you build a dynamic library which uses 64bit multiply, but do not link
in libgcc to the library, then the library will have a reference, but no
definition of __muldi3.
If you later load that library into a program via shl_load/dl_open and the
program does not have __muldi3 defined (because the main program never used
64bit multiplies), then you lose.
The __register_frame stuff is needed to make sure that unwinding
information for the shared library is registered so that you can throw
through a shared library.
Jim has a patch to move __register_frame and friends elsewhere so that
they don't cause multiple symbol definitions. Assuming he thinks the patch
is correct, he should apply it so this problem goes away.
jeff