* ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
authorAlan Modra <amodra@gmail.com>
Tue, 20 Nov 2001 15:31:10 +0000 (15:31 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 20 Nov 2001 15:31:10 +0000 (15:31 +0000)
ld/ChangeLog
ld/ldlang.c

index 28be9d669847d1d85e72ca8507b4f6b65e9b5c89..ddece20c8942a4eb49a0c32030be5f9224328150 100644 (file)
@@ -1,8 +1,12 @@
+2001-11-21  Alan Modra  <amodra@bigpond.net.au>
+
+       * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
+
 2001-11-20  Angela Marie Thomas <angela@redhat.com>
 
        * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
-        of false when calling lang_size_sections.
-       (hppaelf_layout_sections_again): Likewise.
+       of false when calling lang_size_sections.
+       * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
 
 2001-11-15  Alan Modra  <amodra@bigpond.net.au>
 
@@ -56,7 +60,7 @@ Tue Nov 13 11:27:14 2001  Ross Alexander <ross.alexander@uk.neceur.com>
 
        * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
        Add support for targets.
-       
+
 2001-11-02  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * configure.in (ALL_LINGUAS): Add "fr" and "sv"
@@ -68,7 +72,7 @@ Tue Nov 13 11:27:14 2001  Ross Alexander <ross.alexander@uk.neceur.com>
 
        * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
        as little endian default and to support big endian.
-       
+
 2001-11-01  Chris Demetriou  <cgd@broadcom.com>
 
        * ld.texinfo (Options): Document new option, -nostdlib.
index 40f109a94c0aca5ca542089c2bb30384bc4725f8..fa52475898f7d5f8f89eda0fd201b63659d995a5 100644 (file)
@@ -251,47 +251,44 @@ walk_wild_section (ptr, file, callback, data)
       struct wildcard_list *sec;
 
       sec = ptr->section_list;
-      do
+      if (sec == NULL)
+       (*callback) (ptr, sec, s, file, data);
+
+      while (sec != NULL)
        {
          boolean skip = false;
+         struct name_list *list_tmp;
 
-         if (sec != NULL)
+         /* Don't process sections from files which were
+            excluded.  */
+         for (list_tmp = sec->spec.exclude_name_list;
+              list_tmp;
+              list_tmp = list_tmp->next)
            {
-             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)
-               {
-                 if (wildcardp (list_tmp->name))
-                   skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
-                 else
-                   skip = strcmp (list_tmp->name, file->filename) == 0;
+             if (wildcardp (list_tmp->name))
+               skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
+             else
+               skip = strcmp (list_tmp->name, file->filename) == 0;
 
-                 if (skip)
-                   break;
-               }
+             if (skip)
+               break;
+           }
 
-             if (!skip && sec->spec.name != NULL)
-               {
-                 const char *sname = bfd_get_section_name (file->the_bfd, s);
+         if (!skip && sec->spec.name != NULL)
+           {
+             const char *sname = bfd_get_section_name (file->the_bfd, s);
 
-                 if (wildcardp (sec->spec.name))
-                   skip = fnmatch (sec->spec.name, sname, 0) != 0;
-                 else
-                   skip = strcmp (sec->spec.name, sname) != 0;
-               }
+             if (wildcardp (sec->spec.name))
+               skip = fnmatch (sec->spec.name, sname, 0) != 0;
+             else
+               skip = strcmp (sec->spec.name, sname) != 0;
            }
 
          if (!skip)
            (*callback) (ptr, sec, s, file, data);
 
-         if (sec != NULL)
-           sec = sec->next;
+         sec = sec->next;
        }
-      while (sec != NULL);
     }
 }