[PATCH] x86: Properly merge GNU_PROPERTY_X86_ISA_1_USED

H.J. Lu hjl.tools@gmail.com
Wed Aug 8 13:08:00 GMT 2018


On Tue, Aug 7, 2018 at 1:35 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> Without the GNU_PROPERTY_X86_ISA_1_USED property, all ISAs may be used.
> If a bit in the GNU_PROPERTY_X86_ISA_1_USED property is unset, the
> corresponding x86 instruction set isn’t used.  When merging properties
> from 2 input files and one input file doesn't have the
> GNU_PROPERTY_X86_ISA_1_USED property, the output file shouldn't have
> it neither.  This patch removes the GNU_PROPERTY_X86_ISA_1_USED
> property if an input file doesn't have it.
>
> This patch replaces the GNU_PROPERTY_X86_ISA_1_USED property with the
> GNU_PROPERTY_X86_ISA_1_NEEDED property which is the minimum ISA
> requirement.
>
> bfd/
>
>         PR ld/23486
>         * elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Remove
>         GNU_PROPERTY_X86_ISA_1_USED if an input file doesn't have it.
>         (_bfd_x86_elf_link_setup_gnu_properties): Adding the
>         GNU_PROPERTY_X86_ISA_1_NEEDED, instead of
>         GNU_PROPERTY_X86_ISA_1_USED, property.
>
> ld/
>
>         PR ld/23486
>         * testsuite/ld-i386/property-3.r: Remove "x86 ISA used".
>         * testsuite/ld-i386/property-4.r: Likewise.
>         * testsuite/ld-i386/property-5.r: Likewise.
>         * testsuite/ld-i386/property-x86-ibt3a.d: Likewise.
>         * testsuite/ld-i386/property-x86-ibt3b.d: Likewise.
>         * testsuite/ld-i386/property-x86-shstk3a.d: Likewise.
>         * testsuite/ld-i386/property-x86-shstk3b.d: Likewise.
>         * testsuite/ld-x86-64/property-3.r: Likewise.
>         * testsuite/ld-x86-64/property-4.r: Likewise.
>         * testsuite/ld-x86-64/property-5.r: Likewise.
>         * testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise.
>         * testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise.
>         * testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise.
>         * testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise.
>         * testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise.
>         * testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise.
>         * testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise.
>         * testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise.

This is the patch I am checking in.  I will backport it to 2.31 branch later.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Properly-merge-GNU_PROPERTY_X86_ISA_1_USED.patch
Type: text/x-patch
Size: 22746 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180808/10f0d98b/attachment.bin>


More information about the Binutils mailing list