Possible problem with gas on MIPS
Thu Jun 8 03:06:00 GMT 2000
On the tons of assembler code I have I can see that R_MIPS_PC16 type of
relocation is used by objects modules to contain external references from
I would suspect that the shift for R_MIPS_PC16 has not been documented in
the ABI or elsewhere and has just been missed out.
Can't R_MIPS_PC16 be used for BFD_RELOC_16_PCREL_S2 relocations?
This should solve the problem which would also allow object modules to
contain external references from branch opcodes. Also there is not that much
heavy use of R_MIPS_PC16.
-> > 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.
More information about the Binutils