[Top] [All Lists]

Re: bal instruction in gcc 3.x

To: Alexander Voropay <>
Subject: Re: bal instruction in gcc 3.x
From: "Maciej W. Rozycki" <>
Date: Wed, 20 Jul 2005 13:54:02 +0100 (BST)
Cc: Kishore K <>,
In-reply-to: <010901c58d28$15e2a3b0$6cf9a8c0@ALEC>
Original-recipient: rfc822;
References: <> <> <> <1121802786.7285.88.camel@localhost.localdomain> <> <> <010901c58d28$15e2a3b0$6cf9a8c0@ALEC>
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.


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