diff options
Diffstat (limited to 'bfd/elf32-xtensa.c')
-rw-r--r-- | bfd/elf32-xtensa.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 7873292..3a74c2a 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -3430,19 +3430,22 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd, break; case DT_XTENSA_GOT_LOC_OFF: - dyn.d_un.d_ptr = htab->sgotloc->output_section->vma; + dyn.d_un.d_ptr = (htab->sgotloc->output_section->vma + + htab->sgotloc->output_offset); break; case DT_PLTGOT: - dyn.d_un.d_ptr = htab->sgot->output_section->vma; + dyn.d_un.d_ptr = (htab->sgot->output_section->vma + + htab->sgot->output_offset); break; case DT_JMPREL: - dyn.d_un.d_ptr = htab->srelplt->output_section->vma; + dyn.d_un.d_ptr = (htab->srelplt->output_section->vma + + htab->srelplt->output_offset); break; case DT_PLTRELSZ: - dyn.d_un.d_val = htab->srelplt->output_section->size; + dyn.d_un.d_val = htab->srelplt->size; break; case DT_RELASZ: @@ -3453,7 +3456,7 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd, for .rela.plt to follow all other relocation sections, we don't have to worry about changing the DT_RELA entry. */ if (htab->srelplt) - dyn.d_un.d_val -= htab->srelplt->output_section->size; + dyn.d_un.d_val -= htab->srelplt->size; break; } |