diff options
author | Alan Modra <amodra@gmail.com> | 2023-08-24 10:52:19 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-08-24 15:54:39 +0930 |
commit | fb9b7fbf17f50fcfabf6e3d7d06a93e1f17c52b7 (patch) | |
tree | bbb1b44838dd32de708ae59886cddda29e7121d6 /bfd/elfnn-kvx.c | |
parent | sim: or1k: Eliminate dangerous RWX load segments (diff) | |
download | binutils-gdb-fb9b7fbf17f50fcfabf6e3d7d06a93e1f17c52b7.tar.gz binutils-gdb-fb9b7fbf17f50fcfabf6e3d7d06a93e1f17c52b7.tar.bz2 binutils-gdb-fb9b7fbf17f50fcfabf6e3d7d06a93e1f17c52b7.zip |
nds32, sh, kvx: DT_JMPREL/DT_PLTRELSZ
As commit fa4f2d46f9 did for x86, there a few other targets that
wrongly use the output section rather than the dynamic section for
DT_JMPREL and others.
* elfnn-kvx.c (elfNN_kvx_finish_dynamic_sections): Use input
section for DT_JMPREL.
* elf32-sh.c (sh_elf_finish_dynamic_sections): Use input
section for DT_JMPREL and DT_PLTRELSZ.
* elf32-nds32.c (nds32_elf_finish_dynamic_sections): Likewise,
and for DT_PLTGOT and when adjusting DT_RELA.
Diffstat (limited to 'bfd/elfnn-kvx.c')
-rw-r--r-- | bfd/elfnn-kvx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elfnn-kvx.c b/bfd/elfnn-kvx.c index 95580d19930..2dc6ae603ac 100644 --- a/bfd/elfnn-kvx.c +++ b/bfd/elfnn-kvx.c @@ -4589,7 +4589,8 @@ elfNN_kvx_finish_dynamic_sections (bfd *output_bfd, break; case DT_JMPREL: - dyn.d_un.d_ptr = htab->root.srelplt->output_section->vma; + s = htab->root.srelplt; + dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; break; case DT_PLTRELSZ: |