aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c5
1 files changed, 4 insertions, 1 deletions
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