mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-03 14:44:00 +08:00
* ldlang.c (wild_section): Don't get an assertion failure if the
section is discarded.
This commit is contained in:
parent
7617a82283
commit
b58e666f2e
@ -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.
|
||||||
|
20
ld/ldlang.c
20
ld/ldlang.c
@ -1133,15 +1133,21 @@ 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);
|
|
||||||
|
|
||||||
for (pp = &ptr->children.head;
|
/* If we are discarding the section, LIST.HEAD will
|
||||||
*pp != before;
|
be NULL. */
|
||||||
pp = &(*pp)->next)
|
if (list.head != NULL)
|
||||||
ASSERT (*pp != NULL);
|
{
|
||||||
|
ASSERT (list.head->next == NULL);
|
||||||
|
|
||||||
list.head->next = *pp;
|
for (pp = &ptr->children.head;
|
||||||
*pp = list.head;
|
*pp != before;
|
||||||
|
pp = &(*pp)->next)
|
||||||
|
ASSERT (*pp != NULL);
|
||||||
|
|
||||||
|
list.head->next = *pp;
|
||||||
|
*pp = list.head;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user