This is the mail archive of the
mailing list for the binutils project.
Re: sh-linux patch for 32-bit relative relocation
- To: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Subject: Re: sh-linux patch for 32-bit relative relocation
- From: "M. R. Brown" <mrbrown at 0xd6 dot org>
- Date: Mon, 10 Sep 2001 23:24:29 -0500
- Cc: binutils at sourceware dot cygnus dot com
- References: <200109110227.LAA03690@rr.iij4u.or.jp>
* kaz Kojima <email@example.com> on Tue, Sep 11, 2001:
> 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.
> 2001-09-11 Kaz Kojima <firstname.lastname@example.org>
> * 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.