From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18927 invoked by alias); 18 Feb 2005 15:58:45 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 18898 invoked from network); 18 Feb 2005 15:58:41 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 18 Feb 2005 15:58:41 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j1IFwfLd026555 for ; Fri, 18 Feb 2005 10:58:41 -0500 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j1IFweO08999; Fri, 18 Feb 2005 10:58:40 -0500 Received: from [172.31.0.98] (vpnuser4.surrey.redhat.com [172.16.9.4]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j1IFwcMR020700; Fri, 18 Feb 2005 15:58:40 GMT Message-ID: <42161330.4000906@redhat.com> Date: Fri, 18 Feb 2005 21:42:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) MIME-Version: 1.0 To: "Robert O'Callahan" CC: binutils@sources.redhat.com Subject: Re: optimizations for 3x speedup in ld References: <1108598980.7380.87.camel@meekness.apac.novell.com> <4214C3D2.3080300@redhat.com> <1108672669.7380.141.camel@meekness.apac.novell.com> In-Reply-To: <1108672669.7380.141.camel@meekness.apac.novell.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-02/txt/msg00441.txt.bz2 Hi Rob, > I'm attaching the patch so people can see it/test it/comment on it, > keeping in mind this is copyright Novell for now. I have had a look over the patch - it certainly does improve the link times. There were a few small issues with regard to formatting and comment layout, but nothing serious. So provided that Novell want to contribute the code we will be very happy to accept it. Please could you check with Novell management to make sure that it is OK for you to contribute the patch and if so, please let us know. Cheers Nick PS. I had a thought that might improve the speed of the walk_wildcard_consider_section() function. What if you removed the duplicate test of wildcardp (list_tmp->name) ? eg: static void walk_wild_consider_section (lang_wild_statement_type *ptr, lang_input_statement_type *file, asection *s, struct wildcard_list *sec, callback_t callback, void *data) { struct name_list *list_tmp; /* Don't process sections from files which were excluded. */ for (list_tmp = sec->spec.exclude_name_list; list_tmp; list_tmp = list_tmp->next) { bfd_boolean skip; typedef int (*cmp_fn) (const char *, const char *, int); cmp_fn cmp; cmp = wildcardp (list_tmp->name) ? fnmatch : (cmp_fn) strcmp; skip = cmp (list_tmp->name, file->filename, 0) == 0; /* If this file is part of an archive, and the archive is excluded, exclude this file. */ if (! skip && file->the_bfd != NULL && file->the_bfd->my_archive != NULL && file->the_bfd->my_archive->filename != NULL) skip = cmp (list_tmp->name, file->the_bfd->my_archive->filename, 0) == 0; if (skip) return; } callback (ptr, sec, s, file, data); }