diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-06-24 06:14:18 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-06-24 06:14:28 -0700 |
commit | 2c8e370829c7e4ed73d64a9d7be4991521620b3a (patch) | |
tree | 86627221051f1bdbc01a5fdb9350c4715a990b20 /ld/testsuite/ld-csky | |
parent | c679ec98a1296d8da3b5920a9058ba14b47ca3a4 (diff) | |
download | fsf-binutils-gdb-2c8e370829c7e4ed73d64a9d7be4991521620b3a.zip fsf-binutils-gdb-2c8e370829c7e4ed73d64a9d7be4991521620b3a.tar.gz fsf-binutils-gdb-2c8e370829c7e4ed73d64a9d7be4991521620b3a.tar.bz2 |
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.
Diffstat (limited to 'ld/testsuite/ld-csky')
-rw-r--r-- | ld/testsuite/ld-csky/tls-ie-v1.d | 5 | ||||
-rw-r--r-- | ld/testsuite/ld-csky/tls-ie.d | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/ld/testsuite/ld-csky/tls-ie-v1.d b/ld/testsuite/ld-csky/tls-ie-v1.d index 1f5f446..af1858c 100644 --- a/ld/testsuite/ld-csky/tls-ie-v1.d +++ b/ld/testsuite/ld-csky/tls-ie-v1.d @@ -4,7 +4,7 @@ #ld: -shared --hash-style=sysv #readelf: -d -r -Dynamic section at offset 0x[0-9a-f]+ contains 13 entries: +Dynamic section at offset 0x[0-9a-f]+ contains 10 entries: Tag Type Name/Value 0x00000004 \(HASH\) .* 0x00000005 \(STRTAB\) .* @@ -12,9 +12,6 @@ Dynamic section at offset 0x[0-9a-f]+ contains 13 entries: 0x0000000a \(STRSZ\) .* \(bytes\) 0x0000000b \(SYMENT\) .* \(bytes\) 0x00000003 \(PLTGOT\) 0x[0-9a-f]+ - 0x00000002 \(PLTRELSZ\) 0 \(bytes\) - 0x00000014 \(PLTREL\) RELA - 0x00000017 \(JMPREL\) 0x[0-9a-f]+ 0x00000007 \(RELA\) 0x[0-9a-f]+ 0x00000008 \(RELASZ\) 12 \(bytes\) 0x00000009 \(RELAENT\) 12 \(bytes\) diff --git a/ld/testsuite/ld-csky/tls-ie.d b/ld/testsuite/ld-csky/tls-ie.d index 45a8a11..38c2a91 100644 --- a/ld/testsuite/ld-csky/tls-ie.d +++ b/ld/testsuite/ld-csky/tls-ie.d @@ -3,7 +3,7 @@ #ld: -shared --hash-style=sysv #readelf: -d -r -Dynamic section at offset 0x[0-9a-f]+ contains 13 entries: +Dynamic section at offset 0x[0-9a-f]+ contains 10 entries: Tag Type Name/Value 0x00000004 \(HASH\) .* 0x00000005 \(STRTAB\) .* @@ -11,9 +11,6 @@ Dynamic section at offset 0x[0-9a-f]+ contains 13 entries: 0x0000000a \(STRSZ\) .* \(bytes\) 0x0000000b \(SYMENT\) .* \(bytes\) 0x00000003 \(PLTGOT\) 0x[0-9a-f]+ - 0x00000002 \(PLTRELSZ\) 0 \(bytes\) - 0x00000014 \(PLTREL\) RELA - 0x00000017 \(JMPREL\) 0x[0-9a-f]+ 0x00000007 \(RELA\) 0x[0-9a-f]+ 0x00000008 \(RELASZ\) 12 \(bytes\) 0x00000009 \(RELAENT\) 12 \(bytes\) |