This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Bug in >64k-section ELF handling when linking (with -r)
On Sun, Nov 03, 2002 at 04:23:34PM +0100, Hans-Peter Nilsson wrote:
> > Date: Mon, 4 Nov 2002 00:35:48 +1030
> > From: Alan Modra <amodra@bigpond.net.au>
>
> > On Sun, Nov 03, 2002 at 01:58:18AM +0100, Hans-Peter Nilsson wrote:
> > > Hmm, not just ld -r. The trivial test below failed for a "trivial" link
> > > too.
> >
> > Yeah, but a normal final link combines all .text.* and .data.* etc.
> > so that you don't end up with >64k sections.
>
> But then the link doesn't exercise the >64k sections
> functionality at all! (Except perhaps for the reading part, if
> there's a >64k file.)
>
> > > Would you prefer the tests in
> > > ld-elf/sec64k.exp? Perhaps best anyway to wait after a fix is
> > > committed; having test-suite runs hanging is inproductive.
> > Yes, and yes.
>
> Thanks. But mind you, it *does* add 30m-1h(!) YMMV to running
> the test-suite, making it quite awkward. Until Someone
> optimizes the code called from lang_place_orphans(), that is.
> Another, (smaller IIRC) bottleneck is
> lang_check_section_addresses, which can be made O(n) rather than
> O(n*n) (n sections) by creating and comparing each section with
> a memory map rather than all the other sections, given searching
> the sections in increasing order and a mostly-contiguous memory
> map.
In that case, please don't add the testcase right now, or add it
disabled. Adding a half hour to my make check runs would be really
awkward...
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer