Check the DYNAMIC bit for input shared objects
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 20 Jun 2017 03:30:20 +0000 (20:30 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 20 Jun 2017 03:30:20 +0000 (20:30 -0700)
commitabfa390dac6ffcfc6de9659c0b78cfe524347450
treef2e10a623ae60cd7b8c6c3ac258ce37a7a7e449e
parenta6cab9afd2c81465265c8d09569e3e6ef43d2954
Check the DYNAMIC bit for input shared objects

Since the BFD section count may not be cleared for shared objects during
linking, we should check the DYNAMIC bit for input shared objects.

bfd/

PR ld/21626
* elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
the DYNAMIC bit instead of bfd_count_sections.

ld/

PR ld/21626
* testsuite/ld-i386/i386.exp: Run ld/21626 tests.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
bfd/ChangeLog
bfd/elf-properties.c
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-x86-64/x86-64.exp