aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf64-s390.c')
-rw-r--r--bfd/elf64-s390.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 1261044..b085169 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3749,15 +3749,17 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
continue;
case DT_PLTGOT:
- dyn.d_un.d_ptr = htab->elf.sgot->output_section->vma;
+ s = htab->elf.sgotplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_JMPREL:
- dyn.d_un.d_ptr = htab->elf.srelplt->output_section->vma;
+ s = htab->elf.srelplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_PLTRELSZ:
- s = htab->elf.srelplt->output_section;
+ s = htab->elf.srelplt;
dyn.d_un.d_val = s->size;
break;
@@ -3769,7 +3771,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
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 = htab->elf.srelplt->output_section;
+ s = htab->elf.srelplt;
dyn.d_un.d_val -= s->size;
break;
}