csky: Don't generate unnecessary dynamic tags
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Jun 2020 13:14:18 +0000 (06:14 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 24 Jun 2020 13:14:28 +0000 (06:14 -0700)
commit2c8e370829c7e4ed73d64a9d7be4991521620b3a
tree86627221051f1bdbc01a5fdb9350c4715a990b20
parentc679ec98a1296d8da3b5920a9058ba14b47ca3a4
csky: 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-csky.c (csky_elf_size_dynamic_sections): Call
_bfd_elf_add_dynamic_tags.

ld/

PR ld/26083
* testsuite/ld-csky/tls-ie-v1.d: Updated.
* testsuite/ld-csky/tls-ie.d: Likewise.
bfd/ChangeLog
bfd/elf32-csky.c
ld/ChangeLog
ld/testsuite/ld-csky/tls-ie-v1.d
ld/testsuite/ld-csky/tls-ie.d