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]
Other format: [Raw text]

Re: [PATCH/RFA] sh-elf: Unnecessary relocations


On Thu, Oct 03, 2002 at 10:05:17AM +0900, kaz Kojima wrote:
> 	* contig/tc-sh.c (sh_local_pcrel): New.
> 	(sh_force_relocation): Use sh_local_pcrel.

Looks good to me.

> 	* testsuite/gas/sh/pcrel2.d: Check code also.

Do you have a potential endian problem here?


> @@ -3684,7 +3693,8 @@ md_pcrel_from_section (fixP, sec)
>       fixS *fixP;
>       segT sec;
>  {
> -  if (fixP->fx_addsy != (symbolS *) NULL
> +  if (! sh_local_pcrel (fixP)
> +      && fixP->fx_addsy != (symbolS *) NULL
>        && (! S_IS_DEFINED (fixP->fx_addsy)
>  	  || S_IS_EXTERN (fixP->fx_addsy)
>  	  || S_IS_WEAK (fixP->fx_addsy)

These three S_IS_* tests can be replaced with S_FORCE_RELOC.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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