This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: MIPS patch to avoid lazy binding in la macros
- From: "Maciej W. Rozycki" <macro at ds2 dot pg dot gda dot pl>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: binutils at sources dot redhat dot com, echristo at redhat dot com
- Date: Mon, 24 Feb 2003 16:30:17 +0100 (MET)
- Subject: Re: MIPS patch to avoid lazy binding in la macros
- Organization: Technical University of Gdansk
On 24 Feb 2003, Richard Sandiford wrote:
> > So what does exactly the branch do to select between GOT and CALL
> > relocations?
>
> Just to be clear, I'm talking about the gcc mips-3_4-rewrite-branch here.
> It has two modes: one which uses assembler macros (as current gcc does)
> and one that uses explicit %reloc() operators. When using assembler
> macros, it gets lazy binding by using "jal foo".
So what's the problem in the first place?
> > What version of gcc?
>
> mips-3_4-rewrite-branch, in the "assembler macro" mode.
Then either don't use it or live with its shortcomings.
> > Any "la $25,foo" actually as gcc used not to use the register for
> > anything else when emitting SVR4 PIC code.
>
> Are you sure? What stopped gcc from using $25 for anything else?
> Was it declared to be a fixed register?
I haven't seen it elsewhere in generated code. But I can't find it being
declared a fixed register, either (2.95). It might have been pure luck
and I may be wrong, then.
> CVS gas already has support for explicit relocations, see:
>
> http://sources.redhat.com/ml/binutils/2003-01/msg00449.html
> http://sources.redhat.com/ml/binutils/2003-02/msg00044.html
I must have missed them... Too bad they are not unified diffs -- I have
hard time reading context diffs bigger than a few lines.
BTW, why the naming of "%got" vs "%call16" is inconsistent? I fixed it
in my code -- you could do that, too.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro at ds2 dot pg dot gda dot pl, PGP key available +