This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Possible problem with gas on MIPS
- To: Ulf Carlsson <ulfc at calypso dot engr dot sgi dot com>
- Subject: Re: Possible problem with gas on MIPS
- From: "Koundinya.K" <kk at ddeorg dot soft dot net>
- Date: Thu, 08 Jun 2000 15:41:42 +0530
- cc: binutils at sourceware dot cygnus dot com
Hi,
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
branch opcodes.
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.
koundinya
-> > 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
->