This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Fix alpha relocation overflow (Re: PATCH: Add _bfd_elf_provide_symbol)
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: Michael Matz <matz at suse dot de>, binutils at sources dot redhat dot com
- Date: Tue, 3 May 2005 15:01:08 +0930
- Subject: Re: PATCH: Fix alpha relocation overflow (Re: PATCH: Add _bfd_elf_provide_symbol)
- References: <Pine.LNX.4.58.0504250625140.20714@wotan.suse.de> <20050425145458.GA32362@lucon.org> <Pine.LNX.4.58.0504251703020.20714@wotan.suse.de> <20050425172736.GA2235@lucon.org> <20050425174359.GA2592@lucon.org> <Pine.LNX.4.58.0504261359040.20714@wotan.suse.de> <20050426134659.GB20029@lucon.org> <20050427181840.GA12815@lucon.org> <20050503012716.GN9133@bubble.grove.modra.org> <20050503013528.GA1671@lucon.org>
On Mon, May 02, 2005 at 06:35:28PM -0700, H. J. Lu wrote:
> > I think this is a rather horrible hack. Can't you do this some way that
> > avoids the potentially slow section list traversal? How about defining
> > __init_fini_array in the linker script, and using its value instead?
> > (Default to zero if __init_fini_array isn't defined.)
>
> That function is used to avoid __init_fini_array in the linker script.
No, it's to avoid a symbol defined inside an output section. I'm
suggesting a symbol defined like
__init_fini_array = .;
.preinit_array ${RELOCATING-0} : { KEEP (*(.preinit_array)) }
.init_array ${RELOCATING-0} : { KEEP (*(.init_array)) }
.fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) }
--
Alan Modra
IBM OzLabs - Linux Technology Centre