Check if __start/__stop symbols are referenced by shared objects
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 31 Jan 2018 13:10:40 +0000 (05:10 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 31 Jan 2018 13:10:53 +0000 (05:10 -0800)
commit823143c6ca8ef4267e67ba03771991e08d09fabd
treedb64563589a5f1577c0dfeaab5ffdef9a7a0ee83
parentbea298f9547372e6cb7854fabc2c0646e1d3d9be
Check if __start/__stop symbols are referenced by shared objects

Define  __start/__stop symbols if they are referenced by shared objects,
not if they are also defined in shared objects.

bfd/

PR ld/21964
* elflink.c (bfd_elf_define_start_stop): Check if __start and
__stop symbols are referenced by shared objects.

ld/

PR ld/21964
* testsuite/ld-elf/pr21964-4.c: New file.
* testsuite/ld-elf/shared.exp: Run pr21964-4 test on Linux.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/testsuite/ld-elf/pr21964-4.c [new file with mode: 0644]
ld/testsuite/ld-elf/shared.exp