linux-mips
[Top] [All Lists]

Re: bal instruction in gcc 3.x

To: Alexander Voropay <alec@artcoms.ru>
Subject: Re: bal instruction in gcc 3.x
From: "Maciej W. Rozycki" <macro@linux-mips.org>
Date: Wed, 20 Jul 2005 13:54:02 +0100 (BST)
Cc: Kishore K <hellokishore@gmail.com>, linux-mips@linux-mips.org
In-reply-to: <010901c58d28$15e2a3b0$6cf9a8c0@ALEC>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <f07e6e05071909301c212ab4@mail.gmail.com> <20050719164427.GB8758@linux-mips.org> <f07e6e05071910194bab9b16@mail.gmail.com> <1121802786.7285.88.camel@localhost.localdomain> <Pine.LNX.4.61L.0507200955390.30702@blysk.ds.pg.gda.pl> <f07e6e05072002197b529b72@mail.gmail.com> <010901c58d28$15e2a3b0$6cf9a8c0@ALEC>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 20 Jul 2005, Alexander Voropay wrote:

> 3) AFAIK (correct me), there is no MIPS-specific RELOC type for
> the "branch"  instruction format in the BFD, so "bal" to the *external*
> symbols is impossible.

 There is a reloc called BFD_RELOC_16_PCREL_S2 which is used for branches 
by BFD internally, but unfortunately the original SysV ELF supplement for 
MIPS failed to define an appropriate relocation for this purpose (there is 
useless R_MIPS_PC16, though), so there is nothing to map this internal 
relocation to.  There were discussions as to whether reuse R_MIPS_PC16 for 
branches or not.  Unfortunately I don't remember the conclusion -- you'd 
have to find it out yourself.

  Maciej

<Prev in Thread] Current Thread [Next in Thread>