This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: MIPS JAL/JALR to BAL transformation for Linux (o32 ABI)
- From: "Fu, Chao-Ying" <fu at mips dot com>
- To: "Adam Nemet" <anemet at caviumnetworks dot com>, "Richard Sandiford" <rdsandiford at googlemail dot com>
- Cc: <binutils at sourceware dot org>, "Lau, David" <davidlau at mips dot com>, "Garbacea, Ilie" <ilie at mips dot com>, "Hakewill, James" <jamesh at mips dot com>
- Date: Wed, 26 Aug 2009 13:37:51 -0700
- Subject: RE: MIPS JAL/JALR to BAL transformation for Linux (o32 ABI)
Adam Nemet wrote:
> Richard Sandiford writes:
> > Adam Nemet <anemet@caviumnetworks.com> writes:
> > > If we can't do this there is also the other idea which we
> used to do to
> > > avoid -mno-explicit-relocs in our toolchain. Emit jalr
> and jr with an
> > > extra optional operand that is the symbol name of the
> function for PIC
> > > calls and use that to create the JALR relocation.
> >
> > Yeah. These days we could also use (thanks Alan!):
> >
> > .reloc 1f, R_MIPS_JALR, foo
> > 1: jalr $25
>
> Nice!
>
> > Does that mean you already have a GCC patch to do this kind
> of thing?
>
> Yes, I had this on my todo list but it obviously became less
> important after
> non-PIC executable support; the big improvements were due to JALR->JAL
> replacements in the executable. I'll prepare a patch.
>
> Adam
>
Hi Adam,
Any update about this GCC patch? Thanks a lot!
Regards,
Chao-ying