elf: Don't set version info on unversioned symbols
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 18 Sep 2021 16:12:27 +0000 (09:12 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 19 Sep 2021 14:19:39 +0000 (07:19 -0700)
commite4675a5810fc3d0a7d0b1c744f0a1837ccc0507e
tree0b4614c66e6c46feb1d0bf3b7252d0c771139724
parent034ce7b42a1da639979fd743d8b9b1fb86c22d1c
elf: Don't set version info on unversioned symbols

Don't set version info on unversioned symbols when seeing a hidden
versioned symbol after an unversioned definition and the default
versioned symbol.

bfd/

PR ld/28348
* elflink.c (elf_link_add_object_symbols): Don't set version info
on unversioned symbols.

ld/

PR ld/28348
* testsuite/ld-elf/pr28348.rd: New file.
* testsuite/ld-elf/pr28348.t: Likewise.
* testsuite/ld-elf/pr28348a.c: Likewise.
* testsuite/ld-elf/pr28348b.c: Likewise.
* testsuite/ld-elf/pr28348c.c: Likewise.
* testsuite/ld-elf/shared.exp: Run PR ld/28348 tests.
bfd/elflink.c
ld/testsuite/ld-elf/pr28348.rd [new file with mode: 0644]
ld/testsuite/ld-elf/pr28348.t [new file with mode: 0644]
ld/testsuite/ld-elf/pr28348a.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr28348b.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr28348c.c [new file with mode: 0644]
ld/testsuite/ld-elf/shared.exp