diff options
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r-- | ld/emultempl/pe.em | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 0af1d76..2f00269 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -1685,20 +1685,15 @@ gld_${EMULATION_NAME}_place_orphan (file, s) if (place->section != NULL) { - /* 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); } /* Save the end of this list. Further ophans of this type will |