diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em index 7642337a75d..387f55afc99 100644 --- a/contrib/binutils/ld/emultempl/elf32.em +++ b/contrib/binutils/ld/emultempl/elf32.em @@ -15,8 +15,8 @@ cat >e${EMULATION_NAME}.c < ELF support by Ian Lance Taylor @@ -1401,6 +1401,8 @@ gld${EMULATION_NAME}_finish () { if (bfd_elf${ELFSIZE}_discard_info (output_bfd, &link_info)) { + lang_reset_memory_regions (); + /* Resize the sections. */ lang_size_sections (stat_ptr->head, abs_output_section, &stat_ptr->head, 0, (bfd_vma) 0, NULL);