This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: relax jalr $t9 [R_MIPS_JALR symbol] to bal symbol
On Mon, Mar 24, 2003 at 09:34:50PM -0300, Alexandre Oliva wrote:
> > In theory, what you're doing should be ok, but theory has a way
> > of not following practice, especially with binutils.
>
> I don't understand what you mean here. There's no point in using a
> relocation here: we can only do this when doing a final link, and then
> we want to avoid generating relocations, especially in a text section.
You'd smash the in-linker copy of the R_MIPS_JALR relocation
into the proper R_MIPS_FOO relocation. This would be resolved
later in relocate_section. Most other targets work this way.
Here in relax_section, we have not *really* committed to an
object layout. Nearly, yes, but not quite. The difference is
catching linker bugs with relocation out of range errors, or
silently letting them by.
> > Secondly, as a follow-up patch I think that !link_info->shared
> > should make use of the j/jal absolute forms.
>
> You mean, if the branch is out of range, or even if it would be in range?
Um, I dunno. I suspect that bal will never be slower than jal
on any implementation; it's not impossible that the reverse is
not true. Anyone know how this affects Real Life Implementations?
r~