This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: 2.10.91: A problem with R_MIPS_CALL relocations within gas


   Date: Sat, 18 Nov 2000 15:04:22 +0900
   From: Hiroyuki Machida <machida@sm.sony.co.jp>

   From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
   Date: Fri, 17 Nov 2000 18:11:21 +0100 (MET)

   >  It appears for code like the following:
   > 
   > jal <symbol>
   > 
   > gas already emits the proper CALL relocations.  Gcc however prefers to
   > generate code like the following:
   > 
   > la $25,<symbol>
   > jalr $25
   > 
   > possibly because there are problems with other MIPS assemblers.  We don't
   > care of other assemblers, of course, but both pieces of code are obviously
   > correct and thus we should use the dedicated CALL relocations in the
   > latter case as well.

   I think we can fix gcc.
   How about to fix gcc (gcc/config/mips/mips.md) as following.

	   if TARGET_GAS
		   emit jal <symbol>
	   else
		   emit lw	t9,<symbol>; jalr t9

I recommend against that.  You would lose the whole point of splitting
the instructions in the first place.

Ian

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]