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: A patch to make libgcc local in shared library


hjl@lucon.org (H.J. Lu) writes:

|> > > reached. But it ensures those symbols will be included in libfoo.so.
|> > 
|> > But you have to do this for _every_ routine in libgcc.a!  You might
|> > just as well use
|> > 
|> > ld ... foo.o -lc --whole-archive libgcc.a --no-whole-archive
|> > 
|> > to link everything.
|> > 
|> > Any libgcc.a routine may end up in a shared object, and any shared
|> > object might be changed so that its external interface doesn't change
|> > but the set of libgcc.a routines that it uses changes.
|> > 
|> 
|> Here is a patch for egcs. It will make function symbols local in
|> shared libraries.

This is wrong.  It will break exception support if __register_frame_info
is made local.  There must be exactly one active copy of the code in
frame.o, because it uses internal state (static struct object *objects) to
collect the frame information.  If you make it local to the shared library
then no other part of the executable will be able to see the frame
information, and will be unable to unwind through it.

-- 
Andreas Schwab                                      "And now for something
schwab@issan.cs.uni-dortmund.de                      completely different"
schwab@gnu.org


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