diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em index 0b49b63bbd..243d55bd34 100644 --- a/ld/emultempl/hppaelf.em +++ b/ld/emultempl/hppaelf.em @@ -226,6 +226,8 @@ hppaelf_layout_sections_again () add even more stubs. */ need_laying_out = 0; + lang_reset_memory_regions (); + /* Resize the sections. */ lang_size_sections (stat_ptr->head, abs_output_section, &stat_ptr->head, 0, (bfd_vma) 0, NULL); diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 655ddea021..7e524341bf 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -76,6 +76,8 @@ gld${EMULATION_NAME}_finish () need to adjust the stub size again. */ need_laying_out = 0; + lang_reset_memory_regions (); + /* Resize the sections. */ lang_size_sections (stat_ptr->head, abs_output_section, &stat_ptr->head, 0, (bfd_vma) 0, NULL);