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-SH]:Generating proper relocations to linkwithRenesasSHC linker


"Asgari J. Jinia" <AsgariJ@KPITCummins.com> wrote:
>> No.  Such option doesn't make sense unless gas with it behaves like
>> as the Renesas assembler, at least to some extent.  No one can approve
>> your patch without concrete reasoning even if it conditinalized with
>> -mrenesas.  You should show the folks how Renesas assembler does.
> 
> Hi,
> 
> Renesas assembler relocates local symbols against symbol values as 
> mentioned below.
> 
> 00000000 <bar-0x4>:
>    0:   00 00           .word 0x0000
>                         0: R_SH_DIR32   bar
>         ...
> 
> Please consider following patch which also force relocation against symbol. 
> This will make gas behave in the same way as renesas assembler would. Is it 
> okay to conditinalize this patch with switch?
> 
> 
> --- config/tc-sh.c.old	Thu Mar 11 16:21:08 2004
> +++ config/tc-sh.c	Thu Mar 11 16:03:26 2004
> @@ -3520,6 +3520,7 @@ sh_fix_adjustable (fixS *fixP)
>    if (fixP->fx_r_type == BFD_RELOC_32_PLT_PCREL
>        || fixP->fx_r_type == BFD_RELOC_32_GOT_PCREL
>        || fixP->fx_r_type == BFD_RELOC_SH_GOTPC
> +      || fixP->fx_r_type == BFD_RELOC_32
>        || fixP->fx_r_type == BFD_RELOC_RVA)
>      return 0;

Makes sense to me.  Please send a complete patch which includes
the option handling.  Don't forget that adding an option requires
some changes in documentation and perhaps a paperwork with FSF for
the copyright assignment might be needed if your changes are not
small enough.  

> Regarding ld testsuit failures, we are ready to make changes to the ld 
> testsuit for this to get it approved by FSF.

Why?  Our ld testsuite will never use -mrenesas like option for
gas.  It's a testsuite for GNU ld and not for other ld.  No change
in ld testsuit should be required.  Of course, it would be better
if you will add some *as* testsuite for your new option.

Regards,
	kaz


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