This is the mail archive of the
mailing list for the binutils project.
Re: optimizations for 3x speedup in ld
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.
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:
walk_wild_consider_section (lang_wild_statement_type *ptr,
struct wildcard_list *sec,
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->next)
typedef int (*cmp_fn) (const char *, const char *, int);
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;
callback (ptr, sec, s, file, data);