cris: Don't generate unnecessary dynamic tags
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Jun 2020 11:00:19 +0000 (04:00 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Jun 2020 11:00:31 +0000 (04:00 -0700)
commitc679ec98a1296d8da3b5920a9058ba14b47ca3a4
tree1669a20b5d12c0e4cb2561dd58f25b06f5b71fbb
parent5376d47f66d0e4e07b3d42cb62ad07327cad4292
cris: Don't generate unnecessary dynamic tags

Dynamic tags, DT_JMPREL, PLTREL and PLTRELSZ, are needed only if there
are relocation entries for PLT.  Don't generate them if there are no
relocation entries for PLT.

bfd/

PR ld/26083
* elf32-cris.c (elf_cris_size_dynamic_sections): Call
_bfd_elf_add_dynamic_tags.

ld/

PR ld/26083
* testsuite/ld-cris/libdso-15b.d: Updated.
* testsuite/ld-cris/libdso-1c.d: Likewise.
* testsuite/ld-cris/libdso-1d.d: Likewise.
* testsuite/ld-cris/libdso-15c.d: New file.
bfd/ChangeLog
bfd/elf32-cris.c
ld/ChangeLog
ld/testsuite/ld-cris/libdso-15b.d
ld/testsuite/ld-cris/libdso-15c.d [new file with mode: 0644]
ld/testsuite/ld-cris/libdso-1c.d
ld/testsuite/ld-cris/libdso-1d.d