Possible problem with gas on MIPS
Ulf Carlsson
ulfc@calypso.engr.sgi.com
Thu Jun 8 01:59:00 GMT 2000
> RELOCATION RECORDS FOR [.text]:
> OFFSET TYPE VALUE
> 00000004 R_MIPS_PC16 noerror
How is this supposed to work? R_MIPS_PC16 doesn't shift out the lower two
bits of the offset, so the branch instructions can not possibly use this
relocation type. However can do this with the R_MIPS_GNU_REL16_S2 relocation
which is a Cygnus extension.
> li.s: Assembler messages:
> li.s:3: Error: Can not represent BFD_RELOC_16_PCREL_S2 relocation in this
> object file format
I tried it and it goes through the assembler if you use -membedded-pic. I
have not tested it any further though.
Ulf
More information about the Binutils
mailing list