This is the mail archive of the
mailing list for the GCC project.
Re: PATCH - rs6000.c, RS6000_MCOUNT and SVR4 pic
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Graeme Peterson <gp at qnx dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 4 Mar 2004 10:49:25 +1030
- Subject: Re: PATCH - rs6000.c, RS6000_MCOUNT and SVR4 pic
- References: <200402232136.i1NLaJY14361@webmail.qnx.com> <018c01c3fb03$2c3832a0$94010c0a@gpnt> <002301c3fc95$4eae7a90$94010c0a@gpnt> <200402262016.i1QKGjT32826@makai.watson.ibm.com>
On Thu, Feb 26, 2004 at 03:16:44PM -0500, David Edelsohn wrote:
> I'm still investigating why the patch is necessary.
It's only necessary to work around a bug in older binutils, as the
need for @plt disappeared some time ago (My 2003-02-18 bfd/elf32-ppc.c
change, I think).
Even if we didn't care about old binutils, I reckon the patch is worth
applying just to make the _mcount call consistent with other pic calls.
I also checked that everything is reasonable for _mcount to live in a
shared lib. r0 is used to pass the count loc to _mcount, and r0 isn't
trashed by any of the plt call sequences. Even the lazy link stub saves
r0 (with a comment saying that the save is for _mcount).
IBM OzLabs - Linux Technology Centre