This is the mail archive of the 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: optimizations for 3x speedup in ld

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.


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

  callback (ptr, sec, s, file, data);

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