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



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.


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