This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: 2.10.91: A problem with R_MIPS_CALL relocations within gas
- To: macro at ds2 dot pg dot gda dot pl
- Subject: Re: 2.10.91: A problem with R_MIPS_CALL relocations within gas
- From: Hiroyuki Machida <machida at sm dot sony dot co dot jp>
- Date: Sat, 18 Nov 2000 15:04:22 +0900
- Cc: binutils at sourceware dot cygnus dot com, ralf at uni-koblenz dot de, ulfc at engr dot sgi dot com
- References: <Pine.GSO.3.96.1001117154750.28481B-100000@delta.ds2.pg.gda.pl>
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.