This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in >64k-section ELF handling when linking (with -r)


> 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.

brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]