Skip version check for unreferenced and undefined symbol
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jun 2016 15:08:04 +0000 (08:08 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 28 Jun 2016 15:08:30 +0000 (08:08 -0700)
commitf4ab0e2d1d4e14cfdddf46ac846c48ae55f4e14a
treed2afef7558477e2ddbc901c3170a3a0278b61b75
parent1b857aeed3f5cfddc4b5b1f5836ccd341aeb9f5d
Skip version check for unreferenced and undefined symbol

No need to check version if symbol is unreferenced and undefined.

bfd/

PR ld/20306
* elflink.c (elf_link_check_versioned_symbol): Return false
for unreferenced undefined symbol.

ld/testsuite/

* testsuite/ld-gc/gc.exp: Run pr20306 test.
* ld-gc/pr20306.c: New file.
* ld-gc/pr20306.d: Likewise.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-gc/gc.exp
ld/testsuite/ld-gc/pr20306.c [new file with mode: 0644]
ld/testsuite/ld-gc/pr20306.d [new file with mode: 0644]