aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/mmo.em
diff options
context:
space:
mode:
Diffstat (limited to 'ld/emultempl/mmo.em')
-rw-r--r--ld/emultempl/mmo.em11
1 files changed, 3 insertions, 8 deletions
diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em
index f871dec..8fed0f6 100644
--- a/ld/emultempl/mmo.em
+++ b/ld/emultempl/mmo.em
@@ -159,18 +159,13 @@ mmo_place_orphan (file, s)
/* Put orphans after the first section on the list. */
place->section = &bfd_section->next;
- /* Unlink the section. */
+ /* Unlink the section. */
for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
;
- *pps = snew->next;
- if (snew->next == NULL)
- snew->owner->section_tail = pps;
+ bfd_section_list_remove (output_bfd, 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;
+ bfd_section_list_insert (output_bfd, place->section, snew);
}
place->section = &snew->next; /* Save the end of this list. */