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: kk at ddeorg dot soft dot net
- Subject: Re: Possible problem with gas on MIPS
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 8 Jun 2000 09:27:57 -0700
- CC: ulfc at calypso dot engr dot sgi dot com, binutils at sourceware dot cygnus dot com
- References: <200006081151.RAA17625@madras.ddeorg.soft.net>
Date: Thu, 08 Jun 2000 17:21:14 +0530
From: "Koundinya.K" <kk@ddeorg.soft.net>
O.K, here is a tiny patch that I applied to get my assembler stuff compiling
for the same issue.
Index: elf32-mips.c
===================================================================
RCS file: /gnu/cvsroot/binutils-000213/bfd/elf32-mips.c,v
retrieving revision 1.2
diff -u -p -b -r1.2 elf32-mips.c
--- elf32-mips.c 2000/06/08 08:23:45 1.2
+++ elf32-mips.c 2000/06/08 10:13:49
@@ -1843,6 +1843,7 @@ static CONST struct elf_reloc_map mips_r
{ BFD_RELOC_MIPS_LITERAL, R_MIPS_LITERAL },
{ BFD_RELOC_MIPS_GOT16, R_MIPS_GOT16 },
{ BFD_RELOC_16_PCREL, R_MIPS_PC16 },
+ { BFD_RELOC_16_PCREL_S2, R_MIPS_PC16 },
{ BFD_RELOC_MIPS_CALL16, R_MIPS_CALL16 },
{ BFD_RELOC_MIPS_GPREL32, R_MIPS_GPREL32 },
{ BFD_RELOC_MIPS_GOT_HI16, R_MIPS_GOT_HI16 },
Well, this patch can't be right. Either BFD_RELOC_16_PCREL or
BFD_RELOC_16_PCREL_S2 can be translated to R_MIPS_PC16, but not both.
The two BFD relocations are significantly different; we can't possibly
translate them to the same R_MIPS relocation.
Which one is correct depends upon the definition of R_MIPS_PC16.
Ian