This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH-SH]:Generating proper relocations to linkwithRenesasSHC linker
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: binutils at sources dot redhat dot com
- Date: Fri, 26 Mar 2004 23:57:52 +0900 (JST)
- Subject: Re: [PATCH-SH]:Generating proper relocations to linkwithRenesasSHC linker
- References: <69595093233BB547BB70CF5E492B63F204A8FBB1@sohm.kpit.com>
"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