This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFC] Providing init_fini_syms earlier?
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Carlos O'Donell <carlos at systemhalted dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 5 Jul 2005 09:24:03 -0700
- Subject: Re: [RFC] Providing init_fini_syms earlier?
- References: <20050705141342.GC26662@systemhalted.org>
On Tue, Jul 05, 2005 at 10:13:43AM -0400, Carlos O'Donell wrote:
>
> binutils,
>
> If I provide the __init_array_start, __init_array_end,
> __fini_array_start and __fini_array_end symbols earlier, in particular
> before sizing of the dynamic sections, the code has a chance at removing
> a possibly hidden local symbol.
>
> A quick test with the following patch is successfull at removing the
> extra R_PARISC_NONE relocs which are allocated to these symbosls but
> never used. They are allocated because the provides comes after the
> sizing and the symbol is assumed to be undefined dynamic. Once the
> sizing is done the symbol is added and it's too late to remove those
> entries.
>
> I don't believe this patch is correct, a gut feeling says these
> symbols should be provided at the last possible instance.
>
> Comments and insight appreciated?
>
> This patch *does* fix the linker, and R_PARISC_NONE extra relocs are no
> longer emitted. I don't suggest applying this patch, it's just to start
> a discussion.
>
Can you try
http://sourceware.org/ml/binutils/2005-05/msg00767.html
You may have to adjust it a little bit by hand.
H.J.