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: PATCH: Use a double section list to speed up linker by 30%


On Sun, May 01, 2005 at 11:14:29PM -0700, H. J. Lu wrote:
> On Mon, May 02, 2005 at 02:47:13PM +0930, Alan Modra wrote:
> > On Sun, May 01, 2005 at 12:47:57PM -0700, H. J. Lu wrote:
> > > On Sun, May 01, 2005 at 09:57:07AM -0700, H. J. Lu wrote:
> > > > In case of address overlap check, we only
> > > > need to check the previous section.
> > 
> > I don't think this is true.
> 
> I guess I need to go back until the end of the current section <
> the start of the section.

No.  A section's address can be specified in a linker script.  The order
of sections in the output is irrelevant.  If you want to fix
lang_check_section_addresses properly, then replace the algorithm with
one that scales better.  For example, build an array of pointers to the
output sections, then qsort this array on lma.  After doing that you can
simply compare adjacent lmas.

> > > 	(bfd_section_double_list_remove): New.
> > > 	(bfd_section_list_remove): Updated.
> > 
> > I also can't see the sense in both adding new macros and keeping the old
> > ones.
> 
> I will remove bfd_section_list_remove.

Better would be to remove "double_" from the macro names.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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