This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: [patch] MIPS/ELF: %call_r/%got_r operators for relocation override


On 27 Aug 2003, Richard Sandiford wrote:

> >  I've already considered it, but I'm worrying of this case since one may
> > want to use "jal" to be sure the immediate R_MIPS_26 is used in the
> > non-PIC case.  Otherwise I'd fully agree.
> 
> But do you know of any case like that?
> 
> You're catering for someone who is writing code which might be compiled
> as PIC or non-PIC.  But that they know in the PIC case that they don't
> want the called function to be lazily bound, even though there may be
> no non-call relocs to prevent it.
> 
> If someone did find themselves in that situation, I think it's
> reasonable to ask them to use preprocessor macros instead.

 You've convinced me -- that would be such a corner case there is no need
to worry in advance and probably at all. 

> I guess the same could be true of the load address stuff as well.

 I don't think so -- you've had a valid concern about the blind assumption
of "la $25,foo" being a load of an address associated with a function call
and it should be removed, but if true, the assumption was a convenient way
for an assembly programmer to make use of call relocations even if not
tightly coupled with the following jump.  Since the whole idea of
synthesized MIPS assembly instructions is to make life easier for assembly
programmers, providing a replacement for this removed capability seems to
be the right path. 

 I'll provide a new patch soon.  The "lca" and "dlca" names you've
suggested are certainly OK with me, so I'll use them.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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