This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Fix mips PR bootstrap/13145


Richard Henderson <rth@redhat.com> writes:
> On Sat, Nov 29, 2003 at 04:29:01PM +0000, Richard Sandiford wrote:
> > This patch fixes PR 13145, a bootstrap failure on mips-linux-gnu.
> > The problem was that a function's lazy binding stub was being called twice.
> 
> Why is this a problem?  This must work, otherwise threads that 
> simultaneously call the same stub will fail.  The second time
> we call the stub we should fix up the memory in the exact same
> way as the first time we call the stub.  Slightly inefficient,
> perhaps, but there should be no serious consequences.

It could well be a bug in the o32 dynamic linker.  Irix copes with
reentry fine, and so do n32 & n64 on mips.  That's why this hasn't
caused problems in mips64-linux-gnu bootstraps.

But even so, I think this represents a regression for people used to
the old behaviour.  FWIW, even though the irix linker seems to be immune
to the problem, MIPSpro will still reload the address each time.

And like you say, it _is_ inefficient, both in terms of the overhead
of calling the stub twice, and because the code is more bloated
(and not really any faster) from cse-ing the load.

Richard


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