This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Fix linkonce for ELF/PPC.
- To: binutils at sources dot redhat dot com
- Subject: Re: PATCH: Fix linkonce for ELF/PPC.
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Fri, 9 Nov 2001 11:14:47 +1030
- Cc: Martin Schwidefsky <schwidefsky at de dot ibm dot com>
- References: <siadxx9pj3.fsf@daffy.airs.com>
On Thu, Nov 08, 2001 at 08:49:04AM -0800, Ian Lance Taylor wrote:
> Alan Modra <amodra@bigpond.net.au> writes:
> > On Tue, Nov 06, 2001 at 09:42:23AM -0800, Ian Lance Taylor wrote:
> > > Alan Modra <amodra@bigpond.net.au> writes:
> > >
> > > > Looking at .rela.eh_frame in the bad libstdc++, I see a bunch of
> > > > RELATIVE relocs, none of which should cause problems, ADDR32 relocs
> > > > against __gxx_personality_v0, again no problem, and some NONE relocs.
> > > > These are the infamous relocs against removed linkonce sections.
> > >
> > > Why can't we just remove those relocs? Why do we convert them into
> > > NONE relocs?
> >
> > Because space for the relocs in the output section has already been
> > allocated.
>
> Well, then, there's the problem.
Ian knows this, I'm sure, but for others reading the thread: NONE relocs
in themselves aren't really a problem, they just waste space.
elf32-i386, elf32-hppa, elf64-ppc, elf{32,64}-s390 all delay allocation
of dynamic relocs until size_dynamic_sections. That make it possible
to avoid NONE relocs which otherwise will occur due to symbol visibility
changes or discarded link-once sections. See the patch I posted in this
thread. (*) BTW, I'm open to suggestions for a better way to do
bfd_section_from_r_symndx. Perhaps it would make sense just to process
all the local symbols at once, rather than fiddle around with a small
cache. elf{32,64}-hppa both need local syms earlier than
relocate_section, so could make use of them if they were available.
(*) Martin, I have a new patch for your updated s390 back-ends. Um,
and my patch as posted had errors in the ChangeLog, which I've fixed.
Alan