Don't add DT_NEEDED for unmatched symbol
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 1 Feb 2016 23:49:52 +0000 (15:49 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 1 Feb 2016 23:49:52 +0000 (15:49 -0800)
commitaef28989904e92e391fee905e51abc6bb2fd4de0
tree990f90c03f730e0fcd622f28d69ee6b489f64a06
parent713cdcbf65e53e17e3d63799938675bf4a5b38ec
Don't add DT_NEEDED for unmatched symbol

Don't add DT_NEEDED if a symbol from a library loaded via DT_NEEDED
doesn't match the symbol referenced by regular object.

bfd/

PR ld/19553
* elflink.c (elf_link_add_object_symbols): Don't add DT_NEEDED
if a symbol from a library loaded via DT_NEEDED doesn't match
the symbol referenced by regular object.

ld/testsuite/

PR ld/19553
* testsuite/ld-elf/indirect.exp: Run tests for PR ld/19553.
* testsuite/ld-elf/pr19553.map: New file.
* testsuite/ld-elf/pr19553.map: Likewise.
* testsuite/ld-elf/pr19553a.c: Likewise.
* testsuite/ld-elf/pr19553b.c: Likewise.
* testsuite/ld-elf/pr19553b.out: Likewise.
* testsuite/ld-elf/pr19553c.c: Likewise.
* testsuite/ld-elf/pr19553c.out: Likewise.
* testsuite/ld-elf/pr19553d.c: Likewise.
* testsuite/ld-elf/pr19553d.out: Likewise.
12 files changed:
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-elf/indirect.exp
ld/testsuite/ld-elf/pr19553.map [new file with mode: 0644]
ld/testsuite/ld-elf/pr19553a.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr19553b.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr19553b.out [new file with mode: 0644]
ld/testsuite/ld-elf/pr19553c.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr19553c.out [new file with mode: 0644]
ld/testsuite/ld-elf/pr19553d.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr19553d.out [new file with mode: 0644]