This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: __register_frame_info & shared library compatibility



  In message <199904080111.SAA76942@vashon.polstra.com>you write:
  > In article <15609.923487695@upchuck>, Jeffrey A Law  <law@cygnus.com> wrote
  > :
  > 
  > >   > The problem is indeed that egcs 1.1.2 now puts only a weak
  > >   > reference to "__register_frame_info" in crtstuff.  This means
  > >   > that "du moment" one recompiles a shared library that previously
  > >   > contained "__register_frame_info" it probably does not anymore,
  > >   > and programs linked with that library stop running.
  > > Yup.  And I consider this a horrible breakage.  I trusted a couple
  > > of folks with more experience in this area to guide the decision to
  > > include that patch.  They made a mistake.  We need to rectify it.
  > 
  > I don't understand why recompiling a shared library with the
  > weak-referencing version of egcs would cause programs linked with it
  > to stop working.  The library either uses exceptions, or it doesn't.
  > If it uses exceptions, it contains calls to __throw and/or other
  > functions which will cause _eh.o to be pulled in from libgcc.a. _eh.o
  > contains a strong reference to __frame_state_for. __frame_state_for
  > is defined in frame.o, so that will also be pulled in from libgcc.a.
  > Presto, the library has __register_frame_info just the same as always.
Previously the library would always have those routines, even if it did
not use EH.

And any program which referenced that library on the link line would
get those routines via the library intead of getting its own copies.

Now you recompile the library.  It no longer gets the EH routines.  Blam
your user program stops working.

jeff


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