[PATCH-SH]:Generating proper relocations to link withRenesasSHC linker
Asgari J. Jinia
AsgariJ@KPITCummins.com
Fri Mar 26 17:48:00 GMT 2004
> > My earlier patch was for this specific purpose which is Renesas specific.
> > Can this patch be added for -mhitachi or -mrenesas switch so that it can
> > be accepted by FSF? or Can you please suggest any other way to achieve this?
> 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;
This patch will also generate relocation against symbols. For example,
RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
00000000 R_SH_DIR32 bar
Regarding ld testsuit failures, we are ready to make changes to the ld
testsuit for this to get it approved by FSF.
Regards,
Asgari
More information about the Binutils
mailing list