This is the mail archive of the 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]

Re: sh-linux patch for 32-bit relative relocation

* kaz Kojima <> on Tue, Sep 11, 2001:

> Hello,
> Here is a patch for sh-linux to handle the substraction of two
> symbols in different sections correctly. This is essentially same
> with the old patch
> which had a possible ABI problem in non linux targets, but is now
> organized as a linux specific patch which doesn't affect non linux
> targets. Formally the change for gas/tc-sh.c affects all sh targets,
> but the effect of this change is ignored by non linux targets since
> src_mask of HOWTO (R_SH_REL32,... is set to 0 in such targets.
> I think that almost all sh-linux developpers are using this patch
> successfully and enough test is done. Without this, we can't get
> working shared libraries for stdc++, X and many other packages.

I can confirm that this patch has been working for me since at least March
of this year.  I've also used this patch to generate generic sh-elf
targets, and I've had no problems with that code.

> Regards,
> 	kaz
> --
> 2001-09-11  Kaz Kojima  <>
> 	* bfd/elf32-sh-lin.c (LINUX_ABI): Defined.
> 	* bfd/elf32-sh.c (sh_elf_howto_table): Don't mask source
> 	R_SH_REL32 relocation in linux case.
> 	(sh_elf_relocate_section): Use in-place value in computing
> 	addend for R_SH_REL32 relocation in linux case.

M. R.

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