diff options
Diffstat (limited to 'bfd/elf32-vax.c')
-rw-r--r-- | bfd/elf32-vax.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index 56f1d75..355bdd9 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -1929,20 +1929,18 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) break; case DT_PLTGOT: - name = ".got"; + name = ".got.plt"; goto get_vma; case DT_JMPREL: name = ".rela.plt"; get_vma: - s = bfd_get_section_by_name (output_bfd, name); - BFD_ASSERT (s != NULL); - dyn.d_un.d_ptr = s->vma; + s = bfd_get_linker_section (dynobj, name); + 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 = bfd_get_section_by_name (output_bfd, ".rela.plt"); - BFD_ASSERT (s != NULL); + s = bfd_get_linker_section (dynobj, ".rela.plt"); dyn.d_un.d_val = s->size; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); break; @@ -1955,7 +1953,7 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) linker script arranges for .rela.plt to follow all other relocation sections, we don't have to worry about changing the DT_RELA entry. */ - s = bfd_get_section_by_name (output_bfd, ".rela.plt"); + s = bfd_get_linker_section (dynobj, ".rela.plt"); if (s != NULL) dyn.d_un.d_val -= s->size; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); |