This is the mail archive of the
mailing list for the binutils project.
Re: A relocation problem in shared objects for SH
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: A relocation problem in shared objects for SH
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 18 Sep 2000 09:57:16 -0600
- cc: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>, binutils at sourceware dot cygnus dot com, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <firstname.lastname@example.org>you write:
> On Sep 16, 2000, Alexandre Oliva <email@example.com> wrote:
> > On Sep 16, 2000, kaz Kojima <firstname.lastname@example.org> wrote:
> >> One point of this bug may be that it's exposed in the case of the
> >> relocateable object which is generated form several objects by ld -r
> >> command.
> > Right on the nail! Indeed, this causes the bug to show up.
> >> So I think that our ugly patch for elf32-sh.c (or something else) is
> >> still needed.
> > Yep. I'll keep looking for something else for a while :-)
> Here's the ``something else'' I've come up with. It fixes the
> relocatable link, so that it doesn't generate relocations with both
> an in-place value and an addend. I've tried to relocate a lot of PIC
> and non-PIC object files, and it always did The Right Thing (TM), so I
> guess this is the way to go. Ok to install?
> Content-Type: text/x-patch
> Content-Disposition: inline; filename=shpic-bfd-relocatable.patch
> Index: bfd/ChangeLog
> from Alexandre Oliva <email@example.com>
> * elf32-sh.c (sh_elf_relocate_section): Use
> _bfd_final_link_relocate to apply the relocation against a section
> symbol, when doing relocatable links.
Excellent. Please install.