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 Mar 24, 2003, Richard Henderson <rth at redhat dot com> wrote:
> On Mon, Mar 24, 2003 at 02:02:00AM -0300, Alexandre Oliva wrote:
>> + if (contents)
>> + {
>> + instruction = bfd_get_32 (abfd, contents + irel->r_offset);
>> + /* if it's neither jalr nor jr, bail out. */
>> + if ((instruction & 0xfc1fffff) != 0x0000f809
>> + && (instruction & 0xfc1fffff) != 0x00000008)
>> + continue;
> I wouldn't bother doing this so early; you're optimizing
> for the case that'll "never" happen.
Ok.
>> + instruction |= (sym_offset & 0xffff);
> 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.
> 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?
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer