diff options
author | Alan Modra <amodra@gmail.com> | 2009-02-16 08:02:29 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-02-16 08:02:29 +0000 |
commit | d2ae7be0b282653dc7540ca33d4d2a775fff03f3 (patch) | |
tree | af3ca9a6224faf18914eba9ed2e71f82725403aa /ld | |
parent | bde18da45e5dea021d600aadeab702a6f7e31cb2 (diff) | |
download | gdb-d2ae7be0b282653dc7540ca33d4d2a775fff03f3.zip gdb-d2ae7be0b282653dc7540ca33d4d2a775fff03f3.tar.gz gdb-d2ae7be0b282653dc7540ca33d4d2a775fff03f3.tar.bz2 |
* ldlang.c (process_insert_statements): ASSERT that output section
statements are in order.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ldlang.c | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 0636f10..fdb319a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,10 @@ 2009-02-16 Alan Modra <amodra@bigpond.net.au> + * ldlang.c (process_insert_statements): ASSERT that output section + statements are in order. + +2009-02-16 Alan Modra <amodra@bigpond.net.au> + * ldlang.c (push_stat_ptr, pop_stat_ptr): New functions. (stat_save, stat_save_ptr): New variables. (lang_insert_orphan): Use push_stat_ptr and pop_stat_ptr. diff --git a/ld/ldlang.c b/ld/ldlang.c index 0bd82cb..cc390b0 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 |