bfd_elf_define_start_stop: Fix check
authorMichael Matz <matz@suse.de>
Wed, 31 Jan 2018 13:26:46 +0000 (14:26 +0100)
committerMichael Matz <matz@suse.de>
Wed, 31 Jan 2018 13:37:32 +0000 (14:37 +0100)
commitbf3077a6c3c9ff21c072a6f42c91bffefd35bc15
tree5d3837a7783fd87738654b411674c9bbd78efc0e
parent823143c6ca8ef4267e67ba03771991e08d09fabd
bfd_elf_define_start_stop: Fix check

We really need to check for a dynamic def, not only a ref.
See added testcase.

bfd/
* elflink.c (bfd_elf_define_start_stop): Fix check of
def_dynamic.

ld/
* testsuite/ld-elf/pr21964-5.c: New test.
* testsuite/ld-elf/shared.exp: Run it.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-elf/pr21964-5.c [new file with mode: 0644]
ld/testsuite/ld-elf/shared.exp