x86: Properly add X86_ISA_1_NEEDED property
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 11 Aug 2018 13:41:33 +0000 (06:41 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Sat, 11 Aug 2018 13:41:33 +0000 (06:41 -0700)
commitab9e342807d132182892de1be1a92d6e91a5c1da
treed32c6022a8a8bc94e13c72470e6ddaacd6aced8c
parent1dc9e2d63e37839ff1768346b2e3f52e338baba5
x86: Properly add X86_ISA_1_NEEDED property

Existing properties may be removed during property merging.  We avoid
adding X86_ISA_1_NEEDED property only if existing properties won't be
removed.

bfd/

PR ld/23428
* elfxx-x86.c (_bfd_x86_elf_link_setup_gnu_properties): Don't
add X86_ISA_1_NEEDED property only if existing properties won't
be removed.

ld/

PR ld/23428
* testsuite/ld-elf/dummy.s: New file.
* testsuite/ld-elf/linux-x86.S: Add X86_FEATURE_1_AND property.
* testsuite/ld-elf/linux-x86.exp: Add dummy.s to pr23428.
bfd/ChangeLog
bfd/elfxx-x86.c
ld/ChangeLog
ld/testsuite/ld-elf/dummy.s [new file with mode: 0644]
ld/testsuite/ld-elf/linux-x86.S
ld/testsuite/ld-elf/linux-x86.exp