This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


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

Re: DWARF EH for PPC



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>


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