diff options
Diffstat (limited to 'bfd/elf32-nds32.c')
-rw-r--r-- | bfd/elf32-nds32.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index 60cd51e..4f3522a 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -5710,20 +5710,17 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) break; case DT_PLTGOT: - /* name = ".got"; */ - s = htab->sgot->output_section; + s = htab->sgotplt; goto get_vma; case DT_JMPREL: - s = htab->srelplt->output_section; + s = htab->srelplt; get_vma: - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; case DT_PLTRELSZ: - s = htab->srelplt->output_section; - BFD_ASSERT (s != NULL); + s = htab->srelplt; dyn.d_un.d_val = s->size; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; @@ -5740,7 +5737,7 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) about changing the DT_RELA entry. */ if (htab->srelplt != NULL) { - s = htab->srelplt->output_section; + s = htab->srelplt; dyn.d_un.d_val -= s->size; } bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); |