2.10.91: A problem with R_MIPS_CALL relocations within gas

Hiroyuki Machida machida@sm.sony.co.jp
Fri Nov 17 22:05:00 GMT 2000


Hi 

From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Subject: 2.10.91: A problem with R_MIPS_CALL relocations within gas
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
		

---
Hiroyuki Machida
Creative Station		SCE Inc.



More information about the Binutils mailing list