* ldlang.c (wild_section): Don't get an assertion failure if the

section is discarded.
This commit is contained in:
Ian Lance Taylor
1998-07-03 22:10:22 +00:00
parent 7617a82283
commit b58e666f2e
2 changed files with 16 additions and 7 deletions

@ -1,5 +1,8 @@
Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com> Fri Jul 3 14:19:06 1998 Ian Lance Taylor <ian@cygnus.com>
* ldlang.c (wild_section): Don't get an assertion failure if the
section is discarded.
* scripttempl/pe.sc: Use SORT to sort sections appropriately. * scripttempl/pe.sc: Use SORT to sort sections appropriately.
* emultempl/pe.em (sort_by_file_name): Remove. * emultempl/pe.em (sort_by_file_name): Remove.
(sort_by_section_name): Remove. (sort_by_section_name): Remove.

@ -1133,7 +1133,12 @@ wild_section (ptr, section, file, output)
lang_list_init (&list); lang_list_init (&list);
wild_doit (&list, s, output, file); wild_doit (&list, s, output, file);
ASSERT (list.head != NULL && list.head->next == NULL);
/* If we are discarding the section, LIST.HEAD will
be NULL. */
if (list.head != NULL)
{
ASSERT (list.head->next == NULL);
for (pp = &ptr->children.head; for (pp = &ptr->children.head;
*pp != before; *pp != before;
@ -1147,6 +1152,7 @@ wild_section (ptr, section, file, output)
} }
} }
} }
}
/* This is passed a file name which must have been seen already and /* This is passed a file name which must have been seen already and
added to the statement tree. We will see if it has been opened added to the statement tree. We will see if it has been opened