From: Alan Modra Date: Mon, 16 Feb 2009 08:02:29 +0000 (+0000) Subject: * ldlang.c (process_insert_statements): ASSERT that output section X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d2ae7be0b282653dc7540ca33d4d2a775fff03f3;p=binutils-gdb.git * ldlang.c (process_insert_statements): ASSERT that output section statements are in order. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 0636f10ba45..fdb319a5080 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2009-02-16 Alan Modra + + * ldlang.c (process_insert_statements): ASSERT that output section + statements are in order. + 2009-02-16 Alan Modra * ldlang.c (push_stat_ptr, pop_stat_ptr): New functions. diff --git a/ld/ldlang.c b/ld/ldlang.c index 0bd82cb24ab..cc390b0b411 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -3438,7 +3438,10 @@ process_insert_statements (void) { /* Keep pointers to the first and last output section statement in the sequence we may be about to move. */ - last_os = &(*s)->output_section_statement; + os = &(*s)->output_section_statement; + + ASSERT (last_os == NULL || last_os->next == os); + last_os = os; /* Set constraint negative so that lang_output_section_find won't match this output section statement. At this