This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: DWARF EH for PPC
- To: zack@rabi.columbia.edu
- Subject: Re: DWARF EH for PPC
- From: Geoff Keating <geoffk@ozemail.com.au>
- Date: Thu, 10 Dec 1998 09:28:58 +1100
- CC: hjl@lucon.org, drow@cs.cmu.edu, dwarf@polaris.net, libc-hacker@cygnus.com, egcs-bugs@egcs.cygnus.com
- References: <199812091747.MAA28312@blastula.phys.columbia.edu>
I might add that this sort of problem is not just related to glibc,
egcs or C++.
For instance, on my machine there is a library routine in libgcc.a
"__divdi3", which (I think) performs division of 'long long's. The
shared library "libext2.so.2" currently uses it, and so (because like
all shared libraries it is linked with libgcc.a) it defines it:
0001038c g DF .text 000005b4 Base __divdi3
But this means that any application program linked with this library
will _not_ include this routine, because it is in the shared library
which is linked before libgcc.a. Now, suppose the library is changed
so that it no longer requires this routine. Then all those
applications would break.
This is not just an egcs problem, because gcc does the exact same
thing (with regard to __divdi3, and presumably dozens of other
routines in libgcc.a).
So it is not sufficient to just put symbol versioning on
libstdc++.so. It is necessary to put symbol versioning on _every_
shared library. This is unreasonable.
Alternatively, I think Zack proposed a solution where libgcc.a was
linked to every object before any shared objects. This would work,
because it would ensure that any executable that needed it had a copy
of (say) __divdi3 of its own. I recommend this solution.
--
Geoffrey Keating <geoffk@ozemail.com.au>