[ELF] Allow reading of more than one FEATURE_1_AND in same object.
authorPeter Smith <peter.smith@linaro.org>
Wed, 5 Jun 2019 09:31:45 +0000 (09:31 +0000)
committerPeter Smith <peter.smith@linaro.org>
Wed, 5 Jun 2019 09:31:45 +0000 (09:31 +0000)
commite12334a0f248bd1579af995fb09157a65500400a
treec760ee9c0b10bf845b8288f872ec94cbc7f89842
parent6fc4c1cc54ac48acd9af142e4bbcc4e002d53370
[ELF] Allow reading of more than one FEATURE_1_AND in same object.

Although many relocatable objects will have a single
GNU_PROPERTY_X86_FEATURE_1_AND in the .note.gnu.property section it is
permissible to have more than one, and there are tests in ld.bfd that use
it. The behavior that ld.bfd follows is to set the feature bit for a
relocatable object if any of the GNU_PROPERTY_X86_FEATURE_1_AND
have the feature bit set.

Differential Revision: https://reviews.llvm.org/D62862

llvm-svn: 362591
lld/ELF/InputFiles.cpp
lld/test/ELF/i386-cet.s
lld/test/ELF/x86-property-relocatable.s [new file with mode: 0644]