diff options
Diffstat (limited to 'ld/emultempl/mmo.em')
-rw-r--r-- | ld/emultempl/mmo.em | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em index eaf0cae..f871dec 100644 --- a/ld/emultempl/mmo.em +++ b/ld/emultempl/mmo.em @@ -163,10 +163,14 @@ mmo_place_orphan (file, s) for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next) ; *pps = snew->next; + if (snew->next == NULL) + snew->owner->section_tail = pps; /* Now tack it on to the "place->os" section list. */ snew->next = *place->section; *place->section = snew; + if (snew->next == NULL) + snew->owner->section_tail = &snew->next; } place->section = &snew->next; /* Save the end of this list. */ |