Problems building shared libraries under Irix6
Jeffrey A Law
law@cygnus.com
Tue Dec 16 16:17:00 GMT 1997
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
More information about the Gcc
mailing list