Psossible problem with gas on MIPS
Maciej W. Rozycki
macro@ds2.pg.gda.pl
Thu Jun 8 08:44:00 GMT 2000
On Thu, 8 Jun 2000, Koundinya.K wrote:
> li.s: Assembler messages:
> li.s:3: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this
> object file format
>
> Could this be a possible bug in gas ?. I am looking at the source too. Could
> someone having access to MIPS boxes try this test case and verify ?
I recall myself discussing this issue here back in October. The
conclusion was that due to a limited range and thus a questionable
usefulness relocations for branches are not defined by the MIPS ELF ABI.
I prepared a patch to map BFD_RELOC_16_PCREL_S2 to R_MIPS_PC16 then but it
got rejected as not being ABI-compliant.
A R_MIPS_PC16 relocation that the vendor-supplied as generates in not
appropriate for branches. That's beacuse R_MIPS_PC16 is defined as a
simple difference between two addresses in the ABI while for branches you
need a shifted left by two difference.
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: macro@ds2.pg.gda.pl, PGP key available +
More information about the Binutils
mailing list