x86: Update GNU_PROPERTY_X86_XXX macros
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 24 Aug 2018 11:41:50 +0000 (04:41 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 24 Aug 2018 11:42:15 +0000 (04:42 -0700)
This patch updates GNU_PROPERTY_X86_XXX macros:

1. GNU_PROPERTY_X86_UINT32_AND_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in all relocatable inputs:

 #define GNU_PROPERTY_X86_UINT32_AND_LO      0xc0000002
 #define GNU_PROPERTY_X86_UINT32_AND_HI      0xc0007fff

2. GNU_PROPERTY_X86_UINT32_OR_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in any relocatable inputs:

 #define GNU_PROPERTY_X86_UINT32_OR_LO    0xc0008000
 #define GNU_PROPERTY_X86_UINT32_OR_HI    0xc000ffff

3. GNU_PROPERTY_X86_UINT32_OR_AND_XXX: A 4-byte unsigned integer property.
A bit is set if it is set in any relocatable inputs and the property is
present in all relocatable inputs:

 #define GNU_PROPERTY_X86_UINT32_OR_AND_LO   0xc0010000
 #define GNU_PROPERTY_X86_UINT32_OR_AND_HI   0xc0017fff

4. GNU_PROPERTY_X86_FEATURE_2_NEEDED, GNU_PROPERTY_X86_FEATURE_2_USED
and GNU_PROPERTY_X86_FEATURE_2_XXX bits.

GNU_PROPERTY_X86_FEATURE_1_AND is unchanged.  GNU_PROPERTY_X86_ISA_1_USED
and GNU_PROPERTY_X86_ISA_1_NEEDED are updated to better support targeted
processors since GNU_PROPERTY_X86_ISA_1_?86 aren't isn't very useful.
A new set of GNU_PROPERTY_X86_ISA_1_XXX bits are defined.  The previous
GNU_PROPERTY_X86_ISA_1_XXX macros are deprecated and renamed to
GNU_PROPERTY_X86_COMPAT_ISA_1_XXX.

bfd/

* elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
(_bfd_x86_elf_merge_gnu_properties): Likewise.
(_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
instead of X86_ISA_1_NEEDED.
(_bfd_x86_elf_link_fixup_gnu_properties): Handle
X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.

binutils/

* readelf.c (decode_x86_compat_isa): New function.
(decode_x86_feature_2): Likewise.
(decode_x86_isa): Updated for new X86_ISA_1_XXX bits.
(decode_x86_feature): Renamed to ...
(decode_x86_feature_1): This.  Remove the type argument.
(print_gnu_property_note): Handle X86_COMPAT_ISA_1_USED,
X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO, X86_UINT32_AND_HI,
X86_UINT32_OR_LO, X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and
X86_UINT32_OR_AND_HI instead of X86_ISA_1_USED, X86_ISA_1_NEEDED
and X86_FEATURE_1_AND.
* testsuite/binutils-all/i386/pr21231b.s: Updated to the current
GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
values.
* testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494a.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494b.s: Likewise.
* testsuite/binutils-all/x86-64/pr23494c.s: Likewise.
* testsuite/binutils-all/i386/pr21231b.d: Updated.
* testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
* testsuite/binutils-all/x86-64/pr23494e.d: Likewise.

include/

* elf/common.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_ISA_1_USED): This.
(GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED): This.
(GNU_PROPERTY_X86_ISA_1_XXX): Renamed to ...
(GNU_PROPERTY_X86_COMPAT_ISA_1_XXX): This.
(GNU_PROPERTY_X86_UINT32_AND_LO): New.
(GNU_PROPERTY_X86_UINT32_AND_HI): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_LO): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_HI): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_AND_LO): Likewise.
(GNU_PROPERTY_X86_UINT32_OR_AND_HI): Likewise.
(GNU_PROPERTY_X86_ISA_1_CMOV): Likewise.
(GNU_PROPERTY_X86_ISA_1_SSE): Likewise.
(GNU_PROPERTY_X86_ISA_1_SSE2): Likewise.
(GNU_PROPERTY_X86_ISA_1_SSE3): Likewise.
(GNU_PROPERTY_X86_ISA_1_SSSE3): Likewise.
(GNU_PROPERTY_X86_ISA_1_SSE4_1): Likewise.
(GNU_PROPERTY_X86_ISA_1_SSE4_2): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX2): Likewise.
(GNU_PROPERTY_X86_ISA_1_FMA): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512F): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512CD): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512ER): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512PF): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512VL): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512DQ): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512BW): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_BITALG): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_IFMA): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_VBMI): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2): Likewise.
(GNU_PROPERTY_X86_ISA_1_AVX512_VNNI): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_X86): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_X87): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_MMX): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_XMM): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_YMM): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_ZMM): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_FXSR): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_XSAVE): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT): Likewise.
(GNU_PROPERTY_X86_FEATURE_2_XSAVEC): Likewise.
(GNU_PROPERTY_X86_FEATURE_1_AND): Updated to
(GNU_PROPERTY_X86_UINT32_AND_LO + 0).
(GNU_PROPERTY_X86_ISA_1_NEEDED): Defined to
(GNU_PROPERTY_X86_UINT32_OR_LO + 0).
(GNU_PROPERTY_X86_FEATURE_2_NEEDED): New.  Defined to
(GNU_PROPERTY_X86_UINT32_OR_LO + 1).
(GNU_PROPERTY_X86_ISA_1_USED): Defined to
(GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0).
(GNU_PROPERTY_X86_FEATURE_2_USED): New.  Defined to
(GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1).

ld/

* testsuite/ld-i386/i386.exp: Run pr23372c, pr23372d, pr23486c
and pr23486d.
* testsuite/ld-i386/pr23372a.s: Update comments.
* testsuite/ld-i386/pr23372b.s: Likewise.
* testsuite/ld-i386/pr23372c.s: Likewise.
* testsuite/ld-x86-64/pr23372a.s: Likewise.
* testsuite/ld-x86-64/pr23372b.s: Likewise.
* testsuite/ld-x86-64/pr23372c.s: Likewise.
* testsuite/ld-x86-64/pr23486a.s: Likewise.
* testsuite/ld-x86-64/pr23486b.s: Likewise.
* testsuite/ld-i386/pr23372c.d: New file.
* testsuite/ld-i386/pr23372d.d: Likewise.
* testsuite/ld-i386/pr23486c.d: Likewise.
* testsuite/ld-i386/pr23486d.d: Likewise.
* testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372c.d: Likewise.
* testsuite/ld-x86-64/pr23372d-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372d.d: Likewise.
* testsuite/ld-x86-64/pr23372d.s: Likewise.
* testsuite/ld-x86-64/pr23372e.s: Likewise.
* testsuite/ld-x86-64/pr23372f.s: Likewise.
* testsuite/ld-x86-64/pr23486c-x32.d: Likewise.
* testsuite/ld-x86-64/pr23486c.d: Likewise.
* testsuite/ld-x86-64/pr23486c.s: Likewise.
* testsuite/ld-x86-64/pr23486d-x32.d: Likewise.
* testsuite/ld-x86-64/pr23486d.d: Likewise.
* testsuite/ld-x86-64/pr23486d.s: Likewise.
* testsuite/ld-i386/property-3.r: Updated.
* testsuite/ld-i386/property-4.r: Likewise.
* testsuite/ld-i386/property-5.r: Likewise.
* testsuite/ld-i386/property-x86-3.d: Likewise.
* testsuite/ld-i386/property-x86-ibt3a.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-3-x32.d: Likewise.
* testsuite/ld-x86-64/property-x86-3.d: 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.
* testsuite/ld-i386/property-x86-1.S: Updated to the current
GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
values.
* testsuite/ld-i386/property-x86-2.S: Likewise.
* testsuite/ld-i386/property-x86-3.s: Likewise.
* testsuite/ld-x86-64/property-x86-1.S: Likewise.
* testsuite/ld-x86-64/property-x86-2.S: Likewise.
* testsuite/ld-x86-64/property-x86-3.s: Likewise.
* ld/testsuite/ld-x86-64/x86-64.exp: Run pr23372c, pr23372c-x32,
pr23372d, pr23372d-x32, pr23486c, pr23486c-x32, pr23486d and
pr23486d-x32.

76 files changed:
bfd/ChangeLog
bfd/elfxx-x86.c
binutils/ChangeLog
binutils/readelf.c
binutils/testsuite/binutils-all/i386/pr21231b.d
binutils/testsuite/binutils-all/i386/pr21231b.s
binutils/testsuite/binutils-all/x86-64/pr21231b.d
binutils/testsuite/binutils-all/x86-64/pr21231b.s
binutils/testsuite/binutils-all/x86-64/pr23494a-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494a.d
binutils/testsuite/binutils-all/x86-64/pr23494a.s
binutils/testsuite/binutils-all/x86-64/pr23494b.s
binutils/testsuite/binutils-all/x86-64/pr23494c-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494c.d
binutils/testsuite/binutils-all/x86-64/pr23494c.s
binutils/testsuite/binutils-all/x86-64/pr23494d-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494d.d
binutils/testsuite/binutils-all/x86-64/pr23494e-x32.d
binutils/testsuite/binutils-all/x86-64/pr23494e.d
include/ChangeLog
include/elf/common.h
ld/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/pr23372a.s
ld/testsuite/ld-i386/pr23372b.s
ld/testsuite/ld-i386/pr23372c.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr23372c.s
ld/testsuite/ld-i386/pr23372d.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr23486c.d [new file with mode: 0644]
ld/testsuite/ld-i386/pr23486d.d [new file with mode: 0644]
ld/testsuite/ld-i386/property-3.r
ld/testsuite/ld-i386/property-4.r
ld/testsuite/ld-i386/property-5.r
ld/testsuite/ld-i386/property-x86-1.S
ld/testsuite/ld-i386/property-x86-2.S
ld/testsuite/ld-i386/property-x86-3.d
ld/testsuite/ld-i386/property-x86-3.s
ld/testsuite/ld-i386/property-x86-ibt3a.d
ld/testsuite/ld-i386/property-x86-ibt3b.d
ld/testsuite/ld-i386/property-x86-shstk3a.d
ld/testsuite/ld-i386/property-x86-shstk3b.d
ld/testsuite/ld-x86-64/pr23372a.s
ld/testsuite/ld-x86-64/pr23372b.s
ld/testsuite/ld-x86-64/pr23372c-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23372c.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23372c.s
ld/testsuite/ld-x86-64/pr23372d-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23372d.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23372d.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23372e.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23372f.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23486a.s
ld/testsuite/ld-x86-64/pr23486b.s
ld/testsuite/ld-x86-64/pr23486c-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23486c.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23486c.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23486d-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23486d.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr23486d.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/property-3.r
ld/testsuite/ld-x86-64/property-4.r
ld/testsuite/ld-x86-64/property-5.r
ld/testsuite/ld-x86-64/property-x86-1.S
ld/testsuite/ld-x86-64/property-x86-2.S
ld/testsuite/ld-x86-64/property-x86-3-x32.d
ld/testsuite/ld-x86-64/property-x86-3.d
ld/testsuite/ld-x86-64/property-x86-3.s
ld/testsuite/ld-x86-64/property-x86-ibt3a-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt3a.d
ld/testsuite/ld-x86-64/property-x86-ibt3b-x32.d
ld/testsuite/ld-x86-64/property-x86-ibt3b.d
ld/testsuite/ld-x86-64/property-x86-shstk3a-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk3a.d
ld/testsuite/ld-x86-64/property-x86-shstk3b-x32.d
ld/testsuite/ld-x86-64/property-x86-shstk3b.d
ld/testsuite/ld-x86-64/x86-64.exp

index 44690b831f1973b3e0035c7d3bcea0ad288c9ab8..c9e7e2a8509ef2d5ab0b8ec998957c75b73c2373 100644 (file)
@@ -1,3 +1,19 @@
+2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Handle
+       X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED,
+       X86_UINT32_AND_LO, X86_UINT32_AND_HI, X86_UINT32_OR_LO,
+       X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI
+       instead of X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
+       (_bfd_x86_elf_merge_gnu_properties): Likewise.
+       (_bfd_x86_elf_link_setup_gnu_properties): Add X86_FEATURE_2_NEEDED
+       instead of X86_ISA_1_NEEDED.
+       (_bfd_x86_elf_link_fixup_gnu_properties): Handle
+       X86_COMPAT_ISA_1_USED, X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO,
+       X86_UINT32_AND_HI, X86_UINT32_OR_LO, X86_UINT32_OR_HI,
+       X86_UINT32_OR_AND_LO and X86_UINT32_OR_AND_HI instead of
+       X86_ISA_1_USED, X86_ISA_1_NEEDED and X86_FEATURE_1_AND.
+
 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
index 0d91e4dfc95968d2d06c0a3a8f8d7254e3ff9b38..d44ec5ad94ad61146889d169e7a4ba456cab10bf 100644 (file)
@@ -2361,20 +2361,20 @@ _bfd_x86_elf_parse_gnu_properties (bfd *abfd, unsigned int type,
 {
   elf_property *prop;
 
-  switch (type)
+  if (type == GNU_PROPERTY_X86_COMPAT_ISA_1_USED
+      || type == GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED
+      || (type >= GNU_PROPERTY_X86_UINT32_AND_LO
+         && type <= GNU_PROPERTY_X86_UINT32_AND_HI)
+      || (type >= GNU_PROPERTY_X86_UINT32_OR_LO
+         && type <= GNU_PROPERTY_X86_UINT32_OR_HI)
+      || (type >= GNU_PROPERTY_X86_UINT32_OR_AND_LO
+         && type <= GNU_PROPERTY_X86_UINT32_OR_AND_HI))
     {
-    case GNU_PROPERTY_X86_ISA_1_USED:
-    case GNU_PROPERTY_X86_ISA_1_NEEDED:
-    case GNU_PROPERTY_X86_FEATURE_1_AND:
       if (datasz != 4)
        {
          _bfd_error_handler
-           ((type == GNU_PROPERTY_X86_ISA_1_USED
-             ? _("error: %pB: <corrupt x86 ISA used size: 0x%x>")
-             : (type == GNU_PROPERTY_X86_ISA_1_NEEDED
-                ? _("error: %pB: <corrupt x86 ISA needed size: 0x%x>")
-                : _("error: %pB: <corrupt x86 feature size: 0x%x>"))),
-            abfd, datasz);
+           (_("error: %pB: <corrupt x86 property (0x%x) size: 0x%x>"),
+            abfd, type, datasz);
          return property_corrupt;
        }
       prop = _bfd_elf_get_property (abfd, type, datasz);
@@ -2383,13 +2383,10 @@ _bfd_x86_elf_parse_gnu_properties (bfd *abfd, unsigned int type,
       prop->u.number |= (bfd_h_get_32 (abfd, ptr)
                         & ~GNU_PROPERTY_X86_UINT32_VALID);
       prop->pr_kind = property_number;
-      break;
-
-    default:
-      return property_ignored;
+      return property_number;
     }
 
-  return property_number;
+  return property_ignored;
 }
 
 /* Merge x86 GNU property BPROP with APROP.  If APROP isn't NULL,
@@ -2406,9 +2403,10 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
   bfd_boolean updated = FALSE;
   unsigned int pr_type = aprop != NULL ? aprop->pr_type : bprop->pr_type;
 
-  switch (pr_type)
+  if (pr_type == GNU_PROPERTY_X86_COMPAT_ISA_1_USED
+      || (pr_type >= GNU_PROPERTY_X86_UINT32_OR_AND_LO
+         && pr_type <= GNU_PROPERTY_X86_UINT32_OR_AND_HI))
     {
-    case GNU_PROPERTY_X86_ISA_1_USED:
       if (aprop == NULL || bprop == NULL)
        {
          /* Only one of APROP and BPROP can be NULL.  */
@@ -2419,11 +2417,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
              aprop->pr_kind = property_remove;
              updated = TRUE;
            }
-         break;
+         return updated;
        }
       goto or_property;
-
-    case GNU_PROPERTY_X86_ISA_1_NEEDED:
+    }
+  else if (pr_type == GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED
+          || (pr_type >= GNU_PROPERTY_X86_UINT32_OR_LO
+              && pr_type <= GNU_PROPERTY_X86_UINT32_OR_HI))
+    {
       if (aprop != NULL && bprop != NULL)
        {
 or_property:
@@ -2458,9 +2459,11 @@ or_property:
              updated = bprop->u.number != 0;
            }
        }
-      break;
-
-    case GNU_PROPERTY_X86_FEATURE_1_AND:
+      return updated;
+    }
+  else if (pr_type >= GNU_PROPERTY_X86_UINT32_AND_LO
+          && pr_type <= GNU_PROPERTY_X86_UINT32_AND_HI)
+    {
       /* Only one of APROP and BPROP can be NULL:
         1. APROP & BPROP when both APROP and BPROP aren't NULL.
         2. If APROP is NULL, remove x86 feature.
@@ -2511,9 +2514,10 @@ or_property:
              updated = TRUE;
            }
        }
-      break;
-
-    default:
+      return updated;
+    }
+  else
+    {
       /* Never should happen.  */
       abort ();
     }
@@ -2598,27 +2602,30 @@ _bfd_x86_elf_link_setup_gnu_properties
        {
          /* If the separate code program header is needed, make sure
             that the first read-only PT_LOAD segment has no code by
-            adding a GNU_PROPERTY_X86_ISA_1_NEEDED note.  */
+            adding a GNU_PROPERTY_X86_FEATURE_2_NEEDED note.  */
          elf_property_list *list;
          bfd_boolean need_property = TRUE;
 
          for (list = elf_properties (ebfd); list; list = list->next)
-           switch (list->property.pr_type)
-             {
-             case GNU_PROPERTY_STACK_SIZE:
-             case GNU_PROPERTY_NO_COPY_ON_PROTECTED:
-             case GNU_PROPERTY_X86_ISA_1_NEEDED:
-               /* These properties won't be removed during merging.  */
-               need_property = FALSE;
-               break;
-             }
+           {
+             unsigned int pr_type = list->property.pr_type;
+             if (pr_type == GNU_PROPERTY_STACK_SIZE
+                 || pr_type == GNU_PROPERTY_NO_COPY_ON_PROTECTED
+                 || pr_type == GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED
+                 || (pr_type >= GNU_PROPERTY_X86_UINT32_OR_LO
+                     && pr_type <= GNU_PROPERTY_X86_UINT32_OR_HI))
+               {
+                 /* These properties won't be removed during merging.  */
+                 need_property = FALSE;
+                 break;
+               }
+           }
 
          if (need_property)
            {
-             prop = _bfd_elf_get_property (ebfd,
-                                           GNU_PROPERTY_X86_ISA_1_NEEDED,
-                                           4);
-             prop->u.number = GNU_PROPERTY_X86_ISA_1_486;
+             prop = _bfd_elf_get_property
+               (ebfd, GNU_PROPERTY_X86_FEATURE_2_NEEDED, 4);
+             prop->u.number = GNU_PROPERTY_X86_FEATURE_2_X86;
              prop->pr_kind = property_number;
            }
        }
@@ -2971,26 +2978,35 @@ _bfd_x86_elf_link_fixup_gnu_properties (struct bfd_link_info *info,
   elf_property_list *p;
 
   for (p = *listp; p; p = p->next)
-    switch (p->property.pr_type)
-      {
-      case GNU_PROPERTY_X86_ISA_1_USED:
-      case GNU_PROPERTY_X86_ISA_1_NEEDED:
-      case GNU_PROPERTY_X86_FEATURE_1_AND:
-       if (p->property.u.number == 0)
-         {
-           /* Remove empty property.  */
-           *listp = p->next;
-           continue;
-         }
+    {
+      unsigned int type = p->property.pr_type;
+      if (type == GNU_PROPERTY_X86_COMPAT_ISA_1_USED
+         || type == GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED
+         || (type >= GNU_PROPERTY_X86_UINT32_AND_LO
+             && type <= GNU_PROPERTY_X86_UINT32_AND_HI)
+         || (type >= GNU_PROPERTY_X86_UINT32_OR_LO
+             && type <= GNU_PROPERTY_X86_UINT32_OR_HI)
+         || (type >= GNU_PROPERTY_X86_UINT32_OR_AND_LO
+             && type <= GNU_PROPERTY_X86_UINT32_OR_AND_HI))
+       {
+         if (p->property.u.number == 0)
+           {
+             /* Remove empty property.  */
+             *listp = p->next;
+             continue;
+           }
 
-       /* Mark x86-specific properties with X86_UINT32_VALID for
-          non-relocatable output.  */
-       if (!(bfd_link_relocatable (info)))
-         p->property.u.number |= GNU_PROPERTY_X86_UINT32_VALID;
+         /* Mark x86-specific properties with X86_UINT32_VALID for
+            non-relocatable output.  */
+         if (!bfd_link_relocatable (info))
+           p->property.u.number |= GNU_PROPERTY_X86_UINT32_VALID;
 
-       listp = &p->next;
-       break;
-      default:
-       break;
-      }
+         listp = &p->next;
+       }
+      else if (type > GNU_PROPERTY_HIPROC)
+       {
+         /* The property list is sorted in order of type.  */
+         break;
+       }
+    }
 }
index 76af83b6ec574e09e220f29c20748b77802cf1ff..3e26571ea3eec87f0632b28cb91e5894cfd097a2 100644 (file)
@@ -1,3 +1,33 @@
+2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * readelf.c (decode_x86_compat_isa): New function.
+       (decode_x86_feature_2): Likewise.
+       (decode_x86_isa): Updated for new X86_ISA_1_XXX bits.
+       (decode_x86_feature): Renamed to ...
+       (decode_x86_feature_1): This.  Remove the type argument.
+       (print_gnu_property_note): Handle X86_COMPAT_ISA_1_USED,
+       X86_COMPAT_ISA_1_NEEDED, X86_UINT32_AND_LO, X86_UINT32_AND_HI,
+       X86_UINT32_OR_LO, X86_UINT32_OR_HI, X86_UINT32_OR_AND_LO and
+       X86_UINT32_OR_AND_HI instead of X86_ISA_1_USED, X86_ISA_1_NEEDED
+       and X86_FEATURE_1_AND.
+       * testsuite/binutils-all/i386/pr21231b.s: Updated to the current
+       GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
+       values.
+       * testsuite/binutils-all/x86-64/pr21231b.s: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494a.s: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494b.s: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494c.s: Likewise.
+       * testsuite/binutils-all/i386/pr21231b.d: Updated.
+       * testsuite/binutils-all/x86-64/pr21231b.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494a.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494c.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494d.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise.
+       * testsuite/binutils-all/x86-64/pr23494e.d: Likewise.
+
 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        * readelf.c (print_gnu_property_note): Check the
index df946528cad20cb4f65ef74a877b4daabec8a9ee..8d4054fbd26d5ce4b37ee42ddecad585f6dd5060 100644 (file)
@@ -16946,6 +16946,77 @@ get_gnu_elf_note_type (unsigned e_type)
     }
 }
 
+static void
+decode_x86_compat_isa (unsigned int bitmask)
+{
+  while (bitmask)
+    {
+      unsigned int bit = bitmask & (- bitmask);
+
+      bitmask &= ~ bit;
+      switch (bit)
+       {
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_486:
+         printf ("i486");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_586:
+         printf ("586");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_686:
+         printf ("686");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_SSE:
+         printf ("SSE");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_SSE2:
+         printf ("SSE2");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_SSE3:
+         printf ("SSE3");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_SSSE3:
+         printf ("SSSE3");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_SSE4_1:
+         printf ("SSE4_1");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_SSE4_2:
+         printf ("SSE4_2");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX:
+         printf ("AVX");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX2:
+         printf ("AVX2");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512F:
+         printf ("AVX512F");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512CD:
+         printf ("AVX512CD");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512ER:
+         printf ("AVX512ER");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512PF:
+         printf ("AVX512PF");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512VL:
+         printf ("AVX512VL");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512DQ:
+         printf ("AVX512DQ");
+         break;
+       case GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512BW:
+         printf ("AVX512BW");
+         break;
+       default: printf (_("<unknown: %x>"), bit); break;
+       }
+      if (bitmask)
+       printf (", ");
+    }
+}
+
 static void
 decode_x86_isa (unsigned int bitmask)
 {
@@ -16956,24 +17027,78 @@ decode_x86_isa (unsigned int bitmask)
       bitmask &= ~ bit;
       switch (bit)
        {
-       case GNU_PROPERTY_X86_ISA_1_486: printf ("i486"); break;
-       case GNU_PROPERTY_X86_ISA_1_586: printf ("586"); break;
-       case GNU_PROPERTY_X86_ISA_1_686: printf ("686"); break;
-       case GNU_PROPERTY_X86_ISA_1_SSE: printf ("SSE"); break;
-       case GNU_PROPERTY_X86_ISA_1_SSE2: printf ("SSE2"); break;
-       case GNU_PROPERTY_X86_ISA_1_SSE3: printf ("SSE3"); break;
-       case GNU_PROPERTY_X86_ISA_1_SSSE3: printf ("SSSE3"); break;
-       case GNU_PROPERTY_X86_ISA_1_SSE4_1: printf ("SSE4_1"); break;
-       case GNU_PROPERTY_X86_ISA_1_SSE4_2: printf ("SSE4_2"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX: printf ("AVX"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX2: printf ("AVX2"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512F: printf ("AVX512F"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512CD: printf ("AVX512CD"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512ER: printf ("AVX512ER"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512PF: printf ("AVX512PF"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512VL: printf ("AVX512VL"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512DQ: printf ("AVX512DQ"); break;
-       case GNU_PROPERTY_X86_ISA_1_AVX512BW: printf ("AVX512BW"); break;
+       case GNU_PROPERTY_X86_ISA_1_CMOV:
+         printf ("CMOV");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_SSE:
+         printf ("SSE");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_SSE2:
+         printf ("SSE2");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_SSE3:
+         printf ("SSE3");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_SSSE3:
+         printf ("SSSE3");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_SSE4_1:
+         printf ("SSE4_1");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_SSE4_2:
+         printf ("SSE4_2");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX:
+         printf ("AVX");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX2:
+         printf ("AVX2");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_FMA:
+         printf ("FMA");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512F:
+         printf ("AVX512F");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512CD:
+         printf ("AVX512CD");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512ER:
+         printf ("AVX512ER");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512PF:
+         printf ("AVX512PF");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512VL:
+         printf ("AVX512VL");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512DQ:
+         printf ("AVX512DQ");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512BW:
+         printf ("AVX512BW");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS:
+         printf ("AVX512_4FMAPS");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW:
+         printf ("AVX512_4VNNIW");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512_BITALG:
+         printf ("AVX512_BITALG");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512_IFMA:
+         printf ("AVX512_IFMA");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512_VBMI:
+         printf ("AVX512_VBMI");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2:
+         printf ("AVX512_VBMI2");
+         break;
+       case GNU_PROPERTY_X86_ISA_1_AVX512_VNNI:
+         printf ("AVX512_VNNI");
+         break;
        default: printf (_("<unknown: %x>"), bit); break;
        }
       if (bitmask)
@@ -16982,7 +17107,7 @@ decode_x86_isa (unsigned int bitmask)
 }
 
 static void
-decode_x86_feature (unsigned int type, unsigned int bitmask)
+decode_x86_feature_1 (unsigned int bitmask)
 {
   while (bitmask)
     {
@@ -16992,26 +17117,10 @@ decode_x86_feature (unsigned int type, unsigned int bitmask)
       switch (bit)
        {
        case GNU_PROPERTY_X86_FEATURE_1_IBT:
-         switch (type)
-           {
-           case GNU_PROPERTY_X86_FEATURE_1_AND:
-             printf ("IBT");
-             break;
-           default:
-             /* This should never happen.  */
-             abort ();
-           }
+         printf ("IBT");
          break;
        case GNU_PROPERTY_X86_FEATURE_1_SHSTK:
-         switch (type)
-           {
-           case GNU_PROPERTY_X86_FEATURE_1_AND:
-             printf ("SHSTK");
-             break;
-           default:
-             /* This should never happen.  */
-             abort ();
-           }
+         printf ("SHSTK");
          break;
        default:
          printf (_("<unknown: %x>"), bit);
@@ -17022,6 +17131,53 @@ decode_x86_feature (unsigned int type, unsigned int bitmask)
     }
 }
 
+static void
+decode_x86_feature_2 (unsigned int bitmask)
+{
+  while (bitmask)
+    {
+      unsigned int bit = bitmask & (- bitmask);
+
+      bitmask &= ~ bit;
+      switch (bit)
+       {
+       case GNU_PROPERTY_X86_FEATURE_2_X86:
+         printf ("x86");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_X87:
+         printf ("x87");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_MMX:
+         printf ("MMX");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_XMM:
+         printf ("XMM");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_YMM:
+         printf ("YMM");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_ZMM:
+         printf ("ZMM");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_FXSR:
+         printf ("FXSR");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_XSAVE:
+         printf ("XSAVE");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT:
+         printf ("XSAVEOPT");
+         break;
+       case GNU_PROPERTY_X86_FEATURE_2_XSAVEC:
+         printf ("XSAVEC");
+         break;
+       default: printf (_("<unknown: %x>"), bit); break;
+       }
+      if (bitmask)
+       printf (", ");
+    }
+}
+
 static void
 print_gnu_property_note (Filedata * filedata, Elf_Internal_Note * pnote)
 {
@@ -17115,7 +17271,50 @@ print_gnu_property_note (Filedata * filedata, Elf_Internal_Note * pnote)
                  else
                    {
                      printf ("x86 feature: ");
-                     decode_x86_feature (type, bitmask);
+                     decode_x86_feature_1 (bitmask);
+                   }
+                 goto next;
+
+               case GNU_PROPERTY_X86_FEATURE_2_USED:
+                 if (datasz != 4)
+                   printf (_("x86 feature used: <corrupt length: %#x> "),
+                           datasz);
+                 else
+                   {
+                     printf ("x86 feature used: ");
+                     decode_x86_feature_2 (bitmask);
+                   }
+                 goto next;
+
+               case GNU_PROPERTY_X86_FEATURE_2_NEEDED:
+                 if (datasz != 4)
+                   printf (_("x86 feature needed: <corrupt length: %#x> "), datasz);
+                 else
+                   {
+                     printf ("x86 feature needed: ");
+                     decode_x86_feature_2 (bitmask);
+                   }
+                 goto next;
+
+               case GNU_PROPERTY_X86_COMPAT_ISA_1_USED:
+                 if (datasz != 4)
+                   printf (_("x86 ISA used: <corrupt length: %#x> "),
+                           datasz);
+                 else
+                   {
+                     printf ("x86 ISA used: ");
+                     decode_x86_compat_isa (bitmask);
+                   }
+                 goto next;
+
+               case GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED:
+                 if (datasz != 4)
+                   printf (_("x86 ISA needed: <corrupt length: %#x> "),
+                           datasz);
+                 else
+                   {
+                     printf ("x86 ISA needed: ");
+                     decode_x86_compat_isa (bitmask);
                    }
                  goto next;
 
index 29a8f445708a4f74bebb55e45103cef978752688..55d878fdb9c85a1d5e6dbc12cec826f0b45fbe6d 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x0000002c      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
        no copy on protected 
-       x86 ISA used: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, <unknown: 40000>, <unknown: 80000>, <unknown: 100000>, <unknown: 200000>, <unknown: 400000>, <unknown: 800000>, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
-       x86 ISA needed: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL
+       x86 ISA used: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, AVX512_4FMAPS, AVX512_4VNNIW, AVX512_BITALG, AVX512_IFMA, AVX512_VBMI, AVX512_VBMI2, AVX512_VNNI, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
+       x86 ISA needed: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ
index 3d5474518eed8fc1fc100169fef3643fbe8244cc..793e2824713ffc40158da9f04e380a8097578a0d 100644 (file)
        .long 0                 /* pr_datasz.  */
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long -1
 4:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long 0xffff
index 9d7761c3fea134a441e3c77247258bbb84f8e2c8..f433685e6910553a7132942a3ab6550c1868207c 100644 (file)
@@ -8,5 +8,5 @@ Displaying notes found in: .note.gnu.property
   GNU                  0x00000038      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
        no copy on protected 
-       x86 ISA used: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, <unknown: 40000>, <unknown: 80000>, <unknown: 100000>, <unknown: 200000>, <unknown: 400000>, <unknown: 800000>, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
-       x86 ISA needed: i486, 586, 686, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL
+       x86 ISA used: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ, AVX512BW, AVX512_4FMAPS, AVX512_4VNNIW, AVX512_BITALG, AVX512_IFMA, AVX512_VBMI, AVX512_VBMI2, AVX512_VNNI, <unknown: 1000000>, <unknown: 2000000>, <unknown: 4000000>, <unknown: 8000000>, <unknown: 10000000>, <unknown: 20000000>, <unknown: 40000000>, <unknown: 80000000>
+       x86 ISA needed: CMOV, SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2, FMA, AVX512F, AVX512CD, AVX512ER, AVX512PF, AVX512VL, AVX512DQ
index afba4debf3ab89bed0c36c2055e2ac3d979c7aa4..add9227977fd2e03150e3d513d20c37e6a03b79f 100644 (file)
        .long 0                 /* pr_datasz.  */
        .p2align 3
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long -1
 4:
        .p2align 3
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 4f - 3f           /* pr_datasz.  */
 3:
        .long 0xffff
index 67e3aab89e261dbc0208e43567399812975b60d4..ad8f9b16c3f28c7af206796250f8094966e0bbd8 100644 (file)
@@ -8,5 +8,5 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE4_1, AVX
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index 06c193867e3252889409d29c09cfd1c4399d024a..32e296ff1364b8532f11d1012ad5f6595038bf2e 100644 (file)
@@ -8,5 +8,5 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE4_1, AVX
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index 77185bdc1a70942827dedde2a4ea9070095b47a1..26f7139510a90dbb042cd796987bc6c2b2e7b253 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
@@ -48,7 +48,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
@@ -79,7 +79,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
index 239477b082ba8b540b6b0a5a35d1f1a558741241..75a8d5aa7df684c02b2aeb01e65d838b4a14fb1c 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
index c4a9414b41157c5ea6c9b8cb0f55e2b66aa661f9..761c1371e376ed8443d014336343aa3d0e160041 100644 (file)
@@ -8,4 +8,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE
+      Properties: x86 ISA used: SSE, SSE3
index 545777a2aaf44b0ce0b22f3992b0c75bcec41c83..e98b2ae20127e7aa07dcf6d3604b73fb6b470045 100644 (file)
@@ -8,4 +8,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE
+      Properties: x86 ISA used: SSE, SSE3
index a478e7a885b09ea443e5bd0b2afcfb6161323d67..474182cfb01ac76c7d8e9ae46f0503c98800211a 100644 (file)
@@ -48,7 +48,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
@@ -79,7 +79,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
index 264c9d93cd02290ddbd958d4843f6c8a2f391800..b0af2d99085087fe62b76ca58c35983f68718eb5 100644 (file)
@@ -8,5 +8,5 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE4_1, AVX
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index 3237eca54e54d0993db618dbbe3d6c1df66183fe..1731c03a929206ab243e1ddc81bd80cea02e7c1e 100644 (file)
@@ -8,5 +8,5 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE4_1, AVX
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index 825f45d679be4ff97de0467b3a52d7b6e8306b2b..4adfb4aa3bc719c961b43a4e03aebcd6453e6c2a 100644 (file)
@@ -9,5 +9,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000030      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0xffffffff
-       x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: SSE3, SSE4_1
+       x86 ISA needed: SSE4_1, AVX
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index ffb89886f7868ad93d6699dfc921338dd4949013..d9b05388bb978f36cf9a6b474a83ad98bbd7e934 100644 (file)
@@ -9,5 +9,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000024      NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0xffffffff
-       x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: SSE3, SSE4_1
+       x86 ISA needed: SSE4_1, AVX
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index 4b933b157e7c946d3d96a9852a21debbddcc4887..aec4b63589c9e1be2ff19f8eae48fc2e30cf5138 100644 (file)
@@ -1,3 +1,62 @@
+2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elf/common.h (GNU_PROPERTY_X86_ISA_1_USED): Renamed to ...
+       (GNU_PROPERTY_X86_COMPAT_ISA_1_USED): This.
+       (GNU_PROPERTY_X86_ISA_1_NEEDED): Renamed to ...
+       (GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED): This.
+       (GNU_PROPERTY_X86_ISA_1_XXX): Renamed to ...
+       (GNU_PROPERTY_X86_COMPAT_ISA_1_XXX): This.
+       (GNU_PROPERTY_X86_UINT32_AND_LO): New.
+       (GNU_PROPERTY_X86_UINT32_AND_HI): Likewise.
+       (GNU_PROPERTY_X86_UINT32_OR_LO): Likewise.
+       (GNU_PROPERTY_X86_UINT32_OR_HI): Likewise.
+       (GNU_PROPERTY_X86_UINT32_OR_AND_LO): Likewise.
+       (GNU_PROPERTY_X86_UINT32_OR_AND_HI): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_CMOV): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_SSE): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_SSE2): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_SSE3): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_SSSE3): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_SSE4_1): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_SSE4_2): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX2): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_FMA): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512F): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512CD): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512ER): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512PF): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512VL): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512DQ): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512BW): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512_BITALG): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512_IFMA): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512_VBMI): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2): Likewise.
+       (GNU_PROPERTY_X86_ISA_1_AVX512_VNNI): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_X86): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_X87): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_MMX): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_XMM): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_YMM): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_ZMM): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_FXSR): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_XSAVE): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_2_XSAVEC): Likewise.
+       (GNU_PROPERTY_X86_FEATURE_1_AND): Updated to
+       (GNU_PROPERTY_X86_UINT32_AND_LO + 0).
+       (GNU_PROPERTY_X86_ISA_1_NEEDED): Defined to
+       (GNU_PROPERTY_X86_UINT32_OR_LO + 0).
+       (GNU_PROPERTY_X86_FEATURE_2_NEEDED): New.  Defined to
+       (GNU_PROPERTY_X86_UINT32_OR_LO + 1).
+       (GNU_PROPERTY_X86_ISA_1_USED): Defined to
+       (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0).
+       (GNU_PROPERTY_X86_FEATURE_2_USED): New.  Defined to
+       (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1).
+
 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elf/common.h (GNU_PROPERTY_X86_UINT32_VALID): New.
index 55c5505bac9f09b7e2c58bf77350c1ece90e7023..961d022a1b85ce6f4bddae5518f1aded639f6b9e 100644 (file)
 /* Application-specific semantics, hi */
 #define GNU_PROPERTY_HIUSER  0xffffffff
 
-#define GNU_PROPERTY_X86_ISA_1_USED            0xc0000000
-#define GNU_PROPERTY_X86_ISA_1_NEEDED          0xc0000001
-#define GNU_PROPERTY_X86_FEATURE_1_AND         0xc0000002
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_USED     0xc0000000
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED   0xc0000001
+
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_486      (1U << 0)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_586      (1U << 1)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_686      (1U << 2)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_SSE      (1U << 3)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_SSE2     (1U << 4)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_SSE3     (1U << 5)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_SSSE3    (1U << 6)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_SSE4_1   (1U << 7)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_SSE4_2   (1U << 8)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX      (1U << 9)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX2     (1U << 10)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512F  (1U << 11)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512CD (1U << 12)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512ER (1U << 13)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512PF (1U << 14)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512VL (1U << 15)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512DQ (1U << 16)
+#define GNU_PROPERTY_X86_COMPAT_ISA_1_AVX512BW (1U << 17)
+
+/* A 4-byte unsigned integer property: A bit is set if it is set in all
+   relocatable inputs.  */
+#define GNU_PROPERTY_X86_UINT32_AND_LO         0xc0000002
+#define GNU_PROPERTY_X86_UINT32_AND_HI         0xc0007fff
+
+/* A 4-byte unsigned integer property: A bit is set if it is set in any
+   relocatable inputs.  */
+#define GNU_PROPERTY_X86_UINT32_OR_LO          0xc0008000
+#define GNU_PROPERTY_X86_UINT32_OR_HI          0xc000ffff
+
+/* A 4-byte unsigned integer property: A bit is set if it is set in any
+   relocatable inputs and the property is present in all relocatable
+   inputs.  */
+#define GNU_PROPERTY_X86_UINT32_OR_AND_LO      0xc0010000
+#define GNU_PROPERTY_X86_UINT32_OR_AND_HI      0xc0017fff
+
+#define GNU_PROPERTY_X86_FEATURE_1_AND \
+  (GNU_PROPERTY_X86_UINT32_AND_LO + 0)
+
+#define GNU_PROPERTY_X86_ISA_1_NEEDED \
+  (GNU_PROPERTY_X86_UINT32_OR_LO + 0)
+#define GNU_PROPERTY_X86_FEATURE_2_NEEDED \
+  (GNU_PROPERTY_X86_UINT32_OR_LO + 1)
+
+#define GNU_PROPERTY_X86_ISA_1_USED \
+  (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 0)
+#define GNU_PROPERTY_X86_FEATURE_2_USED \
+  (GNU_PROPERTY_X86_UINT32_OR_AND_LO + 1)
 
 /* Set by linker to indicate that the property is valid.  */
 #define GNU_PROPERTY_X86_UINT32_VALID          (1U << 31)
 
-#define GNU_PROPERTY_X86_ISA_1_486           (1U << 0)
-#define GNU_PROPERTY_X86_ISA_1_586           (1U << 1)
-#define GNU_PROPERTY_X86_ISA_1_686           (1U << 2)
-#define GNU_PROPERTY_X86_ISA_1_SSE           (1U << 3)
-#define GNU_PROPERTY_X86_ISA_1_SSE2          (1U << 4)
-#define GNU_PROPERTY_X86_ISA_1_SSE3          (1U << 5)
-#define GNU_PROPERTY_X86_ISA_1_SSSE3         (1U << 6)
-#define GNU_PROPERTY_X86_ISA_1_SSE4_1        (1U << 7)
-#define GNU_PROPERTY_X86_ISA_1_SSE4_2        (1U << 8)
-#define GNU_PROPERTY_X86_ISA_1_AVX           (1U << 9)
-#define GNU_PROPERTY_X86_ISA_1_AVX2          (1U << 10)
-#define GNU_PROPERTY_X86_ISA_1_AVX512F       (1U << 11)
-#define GNU_PROPERTY_X86_ISA_1_AVX512CD      (1U << 12)
-#define GNU_PROPERTY_X86_ISA_1_AVX512ER      (1U << 13)
-#define GNU_PROPERTY_X86_ISA_1_AVX512PF      (1U << 14)
-#define GNU_PROPERTY_X86_ISA_1_AVX512VL      (1U << 15)
-#define GNU_PROPERTY_X86_ISA_1_AVX512DQ      (1U << 16)
-#define GNU_PROPERTY_X86_ISA_1_AVX512BW      (1U << 17)
-
-#define GNU_PROPERTY_X86_FEATURE_1_IBT       (1U << 0)
-#define GNU_PROPERTY_X86_FEATURE_1_SHSTK     (1U << 1)
+#define GNU_PROPERTY_X86_FEATURE_1_IBT         (1U << 0)
+#define GNU_PROPERTY_X86_FEATURE_1_SHSTK       (1U << 1)
+
+#define GNU_PROPERTY_X86_ISA_1_CMOV            (1U << 0)
+#define GNU_PROPERTY_X86_ISA_1_SSE             (1U << 1)
+#define GNU_PROPERTY_X86_ISA_1_SSE2            (1U << 2)
+#define GNU_PROPERTY_X86_ISA_1_SSE3            (1U << 3)
+#define GNU_PROPERTY_X86_ISA_1_SSSE3           (1U << 4)
+#define GNU_PROPERTY_X86_ISA_1_SSE4_1          (1U << 5)
+#define GNU_PROPERTY_X86_ISA_1_SSE4_2          (1U << 6)
+#define GNU_PROPERTY_X86_ISA_1_AVX             (1U << 7)
+#define GNU_PROPERTY_X86_ISA_1_AVX2            (1U << 8)
+#define GNU_PROPERTY_X86_ISA_1_FMA             (1U << 9)
+#define GNU_PROPERTY_X86_ISA_1_AVX512F         (1U << 10)
+#define GNU_PROPERTY_X86_ISA_1_AVX512CD                (1U << 11)
+#define GNU_PROPERTY_X86_ISA_1_AVX512ER                (1U << 12)
+#define GNU_PROPERTY_X86_ISA_1_AVX512PF                (1U << 13)
+#define GNU_PROPERTY_X86_ISA_1_AVX512VL                (1U << 14)
+#define GNU_PROPERTY_X86_ISA_1_AVX512DQ                (1U << 15)
+#define GNU_PROPERTY_X86_ISA_1_AVX512BW                (1U << 16)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_4FMAPS   (1U << 17)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_4VNNIW   (1U << 18)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_BITALG   (1U << 19)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_IFMA     (1U << 20)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI     (1U << 21)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_VBMI2    (1U << 22)
+#define GNU_PROPERTY_X86_ISA_1_AVX512_VNNI     (1U << 23)
+
+#define GNU_PROPERTY_X86_FEATURE_2_X86         (1U << 0)
+#define GNU_PROPERTY_X86_FEATURE_2_X87         (1U << 1)
+#define GNU_PROPERTY_X86_FEATURE_2_MMX         (1U << 2)
+#define GNU_PROPERTY_X86_FEATURE_2_XMM         (1U << 3)
+#define GNU_PROPERTY_X86_FEATURE_2_YMM         (1U << 4)
+#define GNU_PROPERTY_X86_FEATURE_2_ZMM         (1U << 5)
+#define GNU_PROPERTY_X86_FEATURE_2_FXSR                (1U << 6)
+#define GNU_PROPERTY_X86_FEATURE_2_XSAVE       (1U << 7)
+#define GNU_PROPERTY_X86_FEATURE_2_XSAVEOPT    (1U << 8)
+#define GNU_PROPERTY_X86_FEATURE_2_XSAVEC      (1U << 9)
 
 /* Values used in GNU .note.ABI-tag notes (NT_GNU_ABI_TAG).  */
 #define GNU_ABI_TAG_LINUX      0
index c2d47fdceaa82259d0093abdd3cf4916e82a10d6..942843c7f150ac052a4d93d09ee0f5e67a4f2c08 100644 (file)
@@ -1,3 +1,64 @@
+2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * testsuite/ld-i386/i386.exp: Run pr23372c, pr23372d, pr23486c
+       and pr23486d.
+       * testsuite/ld-i386/pr23372a.s: Update comments.
+       * testsuite/ld-i386/pr23372b.s: Likewise.
+       * testsuite/ld-i386/pr23372c.s: Likewise.
+       * testsuite/ld-x86-64/pr23372a.s: Likewise.
+       * testsuite/ld-x86-64/pr23372b.s: Likewise.
+       * testsuite/ld-x86-64/pr23372c.s: Likewise.
+       * testsuite/ld-x86-64/pr23486a.s: Likewise.
+       * testsuite/ld-x86-64/pr23486b.s: Likewise.
+       * testsuite/ld-i386/pr23372c.d: New file.
+       * testsuite/ld-i386/pr23372d.d: Likewise.
+       * testsuite/ld-i386/pr23486c.d: Likewise.
+       * testsuite/ld-i386/pr23486d.d: Likewise.
+       * testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr23372c.d: Likewise.
+       * testsuite/ld-x86-64/pr23372d-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr23372d.d: Likewise.
+       * testsuite/ld-x86-64/pr23372d.s: Likewise.
+       * testsuite/ld-x86-64/pr23372e.s: Likewise.
+       * testsuite/ld-x86-64/pr23372f.s: Likewise.
+       * testsuite/ld-x86-64/pr23486c-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr23486c.d: Likewise.
+       * testsuite/ld-x86-64/pr23486c.s: Likewise.
+       * testsuite/ld-x86-64/pr23486d-x32.d: Likewise.
+       * testsuite/ld-x86-64/pr23486d.d: Likewise.
+       * testsuite/ld-x86-64/pr23486d.s: Likewise.
+       * testsuite/ld-i386/property-3.r: Updated.
+       * testsuite/ld-i386/property-4.r: Likewise.
+       * testsuite/ld-i386/property-5.r: Likewise.
+       * testsuite/ld-i386/property-x86-3.d: Likewise.
+       * testsuite/ld-i386/property-x86-ibt3a.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-3-x32.d: Likewise.
+       * testsuite/ld-x86-64/property-x86-3.d: 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.
+       * testsuite/ld-i386/property-x86-1.S: Updated to the current
+       GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
+       values.
+       * testsuite/ld-i386/property-x86-2.S: Likewise.
+       * testsuite/ld-i386/property-x86-3.s: Likewise.
+       * testsuite/ld-x86-64/property-x86-1.S: Likewise.
+       * testsuite/ld-x86-64/property-x86-2.S: Likewise.
+       * testsuite/ld-x86-64/property-x86-3.s: Likewise.
+       * ld/testsuite/ld-x86-64/x86-64.exp: Run pr23372c, pr23372c-x32,
+       pr23372d, pr23372d-x32, pr23486c, pr23486c-x32, pr23486d and
+       pr23486d-x32.
+
 2018-08-24  Alan Modra  <amodra@gmail.com>
 
        * emultempl/elf32.em (before_allocation): Don't restore
index 78dad025793629290c2dce1bca51064e669e4311..d1aa350f7ec423aef1141bdb2b5c2fd1f84933cd 100644 (file)
@@ -462,8 +462,12 @@ run_dump_test "pr23189"
 run_dump_test "pr23194"
 run_dump_test "pr23372a"
 run_dump_test "pr23372b"
+run_dump_test "pr23372c"
+run_dump_test "pr23372d"
 run_dump_test "pr23486a"
 run_dump_test "pr23486b"
+run_dump_test "pr23486c"
+run_dump_test "pr23486d"
 
 if { !([istarget "i?86-*-linux*"]
        || [istarget "i?86-*-gnu*"]
index 9849d620a1d3386b42bc1cfa7d65856f01a1a95e..eeeac0674e368b24b3f8fc376f3ad3e6547ceb50 100644 (file)
@@ -8,7 +8,7 @@
        .asciz "GNU"            /* vendor name.  */
 1:
        .p2align 2
-       /* GNU_PROPERTY_X86_ISA_1_USED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_USED */
        .long 0xc0000000        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
index 9849d620a1d3386b42bc1cfa7d65856f01a1a95e..eeeac0674e368b24b3f8fc376f3ad3e6547ceb50 100644 (file)
@@ -8,7 +8,7 @@
        .asciz "GNU"            /* vendor name.  */
 1:
        .p2align 2
-       /* GNU_PROPERTY_X86_ISA_1_USED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_USED */
        .long 0xc0000000        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
diff --git a/ld/testsuite/ld-i386/pr23372c.d b/ld/testsuite/ld-i386/pr23372c.d
new file mode 100644 (file)
index 0000000..987ae4c
--- /dev/null
@@ -0,0 +1,5 @@
+#source: ../ld-x86-64/pr23372d.s
+#source: ../ld-x86-64/pr23372e.s
+#as: --32
+#ld: -r -m elf_i386
+#readelf: -n
index 3470dce6490c1a43aa64b611c0085fce83500082..6a871cc5f55dcf04845d1bf5ba1c7f6a6d1bdd99 100644 (file)
@@ -8,7 +8,7 @@
        .asciz "GNU"            /* vendor name.  */
 1:
        .p2align 2
-       /* GNU_PROPERTY_X86_ISA_1_NEEDED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED */
        .long 0xc0000001        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
diff --git a/ld/testsuite/ld-i386/pr23372d.d b/ld/testsuite/ld-i386/pr23372d.d
new file mode 100644 (file)
index 0000000..e44aee9
--- /dev/null
@@ -0,0 +1,5 @@
+#source: ../ld-x86-64/pr23372d.s
+#source: ../ld-x86-64/pr23372f.s
+#as: --32
+#ld: -r -m elf_i386
+#readelf: -n
diff --git a/ld/testsuite/ld-i386/pr23486c.d b/ld/testsuite/ld-i386/pr23486c.d
new file mode 100644 (file)
index 0000000..a557319
--- /dev/null
@@ -0,0 +1,10 @@
+#source: ../ld-x86-64/pr23486c.s
+#source: ../ld-x86-64/pr23486d.s
+#as: --32
+#ld: -r -m elf_i386
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size      Description
+  GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE
diff --git a/ld/testsuite/ld-i386/pr23486d.d b/ld/testsuite/ld-i386/pr23486d.d
new file mode 100644 (file)
index 0000000..48cceb1
--- /dev/null
@@ -0,0 +1,10 @@
+#source: ../ld-x86-64/pr23486d.s
+#source: ../ld-x86-64/pr23486c.s
+#as: --32
+#ld: -r -m elf_i386
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size      Description
+  GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE
index d03203c1e5bc926d72ecce569f5b52a02621152a..e9f71623572c40f8401a3e70c96b64bdcdb11594 100644 (file)
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: i486, 586
+       x86 ISA needed: CMOV, SSE
 #pass
index da295eb6c737cd359cea44d31823252dab069196..876d05708fbc7a294cb473bbf9cdcaef7942ba8f 100644 (file)
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: i486, 586, SSE
+       x86 ISA needed: CMOV, SSE, SSE3
 #pass
index e4141594b3b3f0b7f1b14d90a44c90df59fdd902..adef5e8db213c6d243cef17ffc8e03f56a1a0d96 100644 (file)
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
-       x86 ISA needed: i486, 586, SSE
+       x86 ISA needed: CMOV, SSE, SSE3
 #pass
index 953ca87930b8e36fdcc7b31f69921a1b8c3828fc..f0b8fc0ce5eb068fd45a2aaa7ac6823cd00bb6a6 100644 (file)
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
index f11e1fe241cae50d7250dd9160c5388a6cb1bbb8..39876811cbe17c4c45e999e9a40a1475e0f0f8ad 100644 (file)
@@ -9,14 +9,14 @@
 1:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
index 19c66997164705c64ecd8b284c782e4eb29305b8..1cbd37a6fff9970f6fc2c9e65d8a2a6e8e624e91 100644 (file)
@@ -5,5 +5,5 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: i486, 586, SSE2, SSE3
-       x86 ISA needed: 586, SSE, SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
+       x86 ISA used: CMOV, SSE, SSSE3, SSE4_1
index a6fd830977600f42a26d17939c1d46363b16314f..7e5924f829b5e0bcf96ec6987b8c30dbdf7562dc 100644 (file)
@@ -9,14 +9,14 @@
 1:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
 1:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x30
 5:
        .p2align 2
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
index 0aedea16145ef55a26bc4704c0fba4e3e6e2ceed..b87bc27006b1702a9c100a9b3a121d8288c7b320 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
index bd69ac64783a4d3d6ede07943b84a5ff422506f7..f09ae520ab8e2722577ab8f4c3803b780bc12fe1 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
index 76d2a39f2cf2a904dd10c90b3e1d6e9158204ec9..44f3e57416815f42346a9fe2c813a8e6d717fe67 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
index e770ecffa51b028db2647197de62bec2af00f4bb..db136cdc9aaef9b47346355c4043826bd3fb3185 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: 586, SSE, SSE3, SSE4_1
+      Properties: x86 ISA needed: SSE, SSE3, SSE4_1, AVX
index 639fc26de4ca71b13445c9448d5b5bed33d0d120..75ce47e0da8b3d967f7c8c879492da733cb770fd 100644 (file)
@@ -16,7 +16,7 @@
 .else
        .p2align 2
 .endif
-       /* GNU_PROPERTY_X86_ISA_1_USED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_USED */
        .long 0xc0000000        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
index 639fc26de4ca71b13445c9448d5b5bed33d0d120..75ce47e0da8b3d967f7c8c879492da733cb770fd 100644 (file)
@@ -16,7 +16,7 @@
 .else
        .p2align 2
 .endif
-       /* GNU_PROPERTY_X86_ISA_1_USED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_USED */
        .long 0xc0000000        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
diff --git a/ld/testsuite/ld-x86-64/pr23372c-x32.d b/ld/testsuite/ld-x86-64/pr23372c-x32.d
new file mode 100644 (file)
index 0000000..863f4b7
--- /dev/null
@@ -0,0 +1,5 @@
+#source: pr23372d.s
+#source: pr23372e.s
+#as: --x32
+#ld: -r -m elf32_x86_64
+#readelf: -n
diff --git a/ld/testsuite/ld-x86-64/pr23372c.d b/ld/testsuite/ld-x86-64/pr23372c.d
new file mode 100644 (file)
index 0000000..23bdaa7
--- /dev/null
@@ -0,0 +1,5 @@
+#source: pr23372d.s
+#source: pr23372e.s
+#as: --64 -defsym __64_bit__=1
+#ld: -r -m elf_x86_64
+#readelf: -n
index b4eaf697779e5a86176fadc40268d1cdc56c49c3..2efb9bded42e3870a80d5e27f800a619ee4c6701 100644 (file)
@@ -16,7 +16,7 @@
 .else
        .p2align 2
 .endif
-       /* GNU_PROPERTY_X86_ISA_1_NEEDED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED */
        .long 0xc0000001        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
diff --git a/ld/testsuite/ld-x86-64/pr23372d-x32.d b/ld/testsuite/ld-x86-64/pr23372d-x32.d
new file mode 100644 (file)
index 0000000..80c783d
--- /dev/null
@@ -0,0 +1,5 @@
+#source: pr23372d.s
+#source: pr23372f.s
+#as: --x32
+#ld: -r -m elf32_x86_64
+#readelf: -n
diff --git a/ld/testsuite/ld-x86-64/pr23372d.d b/ld/testsuite/ld-x86-64/pr23372d.d
new file mode 100644 (file)
index 0000000..3552698
--- /dev/null
@@ -0,0 +1,5 @@
+#source: pr23372d.s
+#source: pr23372f.s
+#as: --64 -defsym __64_bit__=1
+#ld: -r -m elf_x86_64
+#readelf: -n
diff --git a/ld/testsuite/ld-x86-64/pr23372d.s b/ld/testsuite/ld-x86-64/pr23372d.s
new file mode 100644 (file)
index 0000000..cec05cd
--- /dev/null
@@ -0,0 +1,30 @@
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length.  */
+       .long 4f - 1f           /* data length.  */
+       /* NT_GNU_PROPERTY_TYPE_0 */
+       .long 5                 /* note type.  */
+0:
+       .asciz "GNU"            /* vendor name.  */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_ISA_1_USED */
+       .long 0xc0010000        /* pr_type.  */
+       .long 3f - 2f           /* pr_datasz.  */
+2:
+       .long 0x0
+3:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+4:
diff --git a/ld/testsuite/ld-x86-64/pr23372e.s b/ld/testsuite/ld-x86-64/pr23372e.s
new file mode 100644 (file)
index 0000000..cec05cd
--- /dev/null
@@ -0,0 +1,30 @@
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length.  */
+       .long 4f - 1f           /* data length.  */
+       /* NT_GNU_PROPERTY_TYPE_0 */
+       .long 5                 /* note type.  */
+0:
+       .asciz "GNU"            /* vendor name.  */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_ISA_1_USED */
+       .long 0xc0010000        /* pr_type.  */
+       .long 3f - 2f           /* pr_datasz.  */
+2:
+       .long 0x0
+3:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+4:
diff --git a/ld/testsuite/ld-x86-64/pr23372f.s b/ld/testsuite/ld-x86-64/pr23372f.s
new file mode 100644 (file)
index 0000000..57797c8
--- /dev/null
@@ -0,0 +1,30 @@
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length.  */
+       .long 4f - 1f           /* data length.  */
+       /* NT_GNU_PROPERTY_TYPE_0 */
+       .long 5                 /* note type.  */
+0:
+       .asciz "GNU"            /* vendor name.  */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_ISA_1_NEEDED */
+       .long 0xc0008000        /* pr_type.  */
+       .long 3f - 2f           /* pr_datasz.  */
+2:
+       .long 0x0
+3:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+4:
index a07d0c7ced4a77fb2f95396b7175ce03743d177e..b04960ca28b1032fec82acd9840d28efc4a265f7 100644 (file)
@@ -16,7 +16,7 @@
 .else
        .p2align 2
 .endif
-       /* GNU_PROPERTY_X86_ISA_1_USED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_USED */
        .long 0xc0000000        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
index c5167eeb65177a3b9430e720acc7f016e2443ab0..500da3a4aea07d672dcbb51ff1af9e9f8308efa6 100644 (file)
@@ -16,7 +16,7 @@
 .else
        .p2align 2
 .endif
-       /* GNU_PROPERTY_X86_ISA_1_NEEDED */
+       /* GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED */
        .long 0xc0000001        /* pr_type.  */
        .long 3f - 2f           /* pr_datasz.  */
 2:
diff --git a/ld/testsuite/ld-x86-64/pr23486c-x32.d b/ld/testsuite/ld-x86-64/pr23486c-x32.d
new file mode 100644 (file)
index 0000000..acbabe1
--- /dev/null
@@ -0,0 +1,10 @@
+#source: pr23486c.s
+#source: pr23486d.s
+#as: --x32
+#ld: -r -m elf32_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size      Description
+  GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE
diff --git a/ld/testsuite/ld-x86-64/pr23486c.d b/ld/testsuite/ld-x86-64/pr23486c.d
new file mode 100644 (file)
index 0000000..c7e91da
--- /dev/null
@@ -0,0 +1,10 @@
+#source: pr23486c.s
+#source: pr23486d.s
+#as: --64 -defsym __64_bit__=1
+#ld: -r -m elf_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size      Description
+  GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE
diff --git a/ld/testsuite/ld-x86-64/pr23486c.s b/ld/testsuite/ld-x86-64/pr23486c.s
new file mode 100644 (file)
index 0000000..16bb94d
--- /dev/null
@@ -0,0 +1,30 @@
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length.  */
+       .long 4f - 1f           /* data length.  */
+       /* NT_GNU_PROPERTY_TYPE_0 */
+       .long 5                 /* note type.  */
+0:
+       .asciz "GNU"            /* vendor name.  */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_ISA_1_USED */
+       .long 0xc0010000        /* pr_type.  */
+       .long 3f - 2f           /* pr_datasz.  */
+2:
+       .long 0xa
+3:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+4:
diff --git a/ld/testsuite/ld-x86-64/pr23486d-x32.d b/ld/testsuite/ld-x86-64/pr23486d-x32.d
new file mode 100644 (file)
index 0000000..fa72d4b
--- /dev/null
@@ -0,0 +1,10 @@
+#source: pr23486d.s
+#source: pr23486c.s
+#as: --x32
+#ld: -r -m elf32_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size      Description
+  GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE
diff --git a/ld/testsuite/ld-x86-64/pr23486d.d b/ld/testsuite/ld-x86-64/pr23486d.d
new file mode 100644 (file)
index 0000000..1f0ed23
--- /dev/null
@@ -0,0 +1,10 @@
+#source: pr23486d.s
+#source: pr23486c.s
+#as: --64 -defsym __64_bit__=1
+#ld: -r -m elf_x86_64
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+  Owner                 Data size      Description
+  GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
+      Properties: x86 ISA needed: CMOV, SSE
diff --git a/ld/testsuite/ld-x86-64/pr23486d.s b/ld/testsuite/ld-x86-64/pr23486d.s
new file mode 100644 (file)
index 0000000..88f9c11
--- /dev/null
@@ -0,0 +1,30 @@
+       .section ".note.gnu.property", "a"
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       .long 1f - 0f           /* name length.  */
+       .long 4f - 1f           /* data length.  */
+       /* NT_GNU_PROPERTY_TYPE_0 */
+       .long 5                 /* note type.  */
+0:
+       .asciz "GNU"            /* vendor name.  */
+1:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+       /* GNU_PROPERTY_X86_ISA_1_NEEDED */
+       .long 0xc0008000        /* pr_type.  */
+       .long 3f - 2f           /* pr_datasz.  */
+2:
+       .long 0x3
+3:
+.ifdef __64_bit__
+       .p2align 3
+.else
+       .p2align 2
+.endif
+4:
index d03203c1e5bc926d72ecce569f5b52a02621152a..e9f71623572c40f8401a3e70c96b64bdcdb11594 100644 (file)
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: i486, 586
+       x86 ISA needed: CMOV, SSE
 #pass
index da295eb6c737cd359cea44d31823252dab069196..876d05708fbc7a294cb473bbf9cdcaef7942ba8f 100644 (file)
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x800000
-       x86 ISA needed: i486, 586, SSE
+       x86 ISA needed: CMOV, SSE, SSE3
 #pass
index e4141594b3b3f0b7f1b14d90a44c90df59fdd902..adef5e8db213c6d243cef17ffc8e03f56a1a0d96 100644 (file)
@@ -3,5 +3,5 @@ Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: stack size: 0x900000
-       x86 ISA needed: i486, 586, SSE
+       x86 ISA needed: CMOV, SSE, SSE3
 #pass
index 33f2ccdade4115d9e3300c76827f7508731acb1f..c950b9db1932953fb2c25e92d879b66aa7a7f5e2 100644 (file)
 5:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
 5:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
index 132e5218f5d52b18cf6a3013350db811eb67bcf4..72056be46eb5d7e9624faf7ebeb7b4afd1057b43 100644 (file)
 1:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
 5:
        .p2align ALIGN
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
index cd8a2b5c36c9cdba6144e5bf0644ba0cfd93e9df..d70224a1f3981abe398f17a7bb6a71c3d0c41ae6 100644 (file)
@@ -6,5 +6,5 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000018      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index 6686b14dd0ae38448450fdc2ad558b1f9e377a3a..2cd5c8fcef83009d932ee248faa2ce9f886f6099 100644 (file)
@@ -5,5 +5,5 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000020      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA used: 586, SSE, SSE3, SSE4_1
-       x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
+       x86 ISA used: SSE, SSE3, SSE4_1, AVX
index 239cf622ff57353bace680483465cf7de5e9a999..8c9d6dac847cbab5225487a6376baa55c6bd009d 100644 (file)
@@ -17,7 +17,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa
@@ -28,7 +28,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x3
@@ -59,7 +59,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_USED */
-       .long 0xc0000000        /* pr_type.  */
+       .long 0xc0010000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0xa0
@@ -70,7 +70,7 @@
        .p2align 2
 .endif
        /* GNU_PROPERTY_X86_ISA_1_NEEDED */
-       .long 0xc0000001        /* pr_type.  */
+       .long 0xc0008000        /* pr_type.  */
        .long 5f - 4f           /* pr_datasz.  */
 4:
        .long 0x30
index 4cec728dc743908780bbeffc59723e42017593d6..f87ecff6af0126aa7dfcf9e3290fae911e88120b 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index a8df49a351b46bbd42b0c120755625f6e9d08101..902691395c0d708f4e83da26d22887a07a410d2c 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index c112626711217fce8a38b029949b76404899d615..45f6037ad77b6e840af53671c338f14dac4e89c2 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index f10dffdc2c371ca0826f17b829595a55ee69d666..259e333bcd036151bd394cc3107e37567b6c7bf6 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index 0147a3c7b631dfa84bdf6c90c2a03bd0490cf168..85fcb6b353736932ce23ec56d11caa53de61e887 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index 1f8c2dc92900c5776cf96ac051f2fc2e7ae12a2e..0eb42e7ab2eb7aa6c1e1e5cfeb6c578d1d256d8a 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index 7ca2539ca50f3d2900d2672877f3ade17a910860..23a8be6a232dcf550003bd9c5585f9ce72236312 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x0000000c      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index f66a40e44902ed83d7740f2cf747bb95e592e7c1..152eea5353cd5de49740b7f7171ed99c85c343fd 100644 (file)
@@ -7,4 +7,4 @@
 Displaying notes found in: .note.gnu.property
   Owner                 Data size      Description
   GNU                  0x00000010      NT_GNU_PROPERTY_TYPE_0
-      Properties: x86 ISA needed: i486, 586, SSE2, SSE3
+      Properties: x86 ISA needed: CMOV, SSE, SSSE3, SSE4_1
index ae21e554adf43aa003eccf804bad24c6a2fda1d9..41f40e7581de6b11b7cad9afa0317504ac15ace0 100644 (file)
@@ -403,10 +403,18 @@ run_dump_test "pr23372a"
 run_dump_test "pr23372a-x32"
 run_dump_test "pr23372b"
 run_dump_test "pr23372b-x32"
+run_dump_test "pr23372c"
+run_dump_test "pr23372c-x32"
+run_dump_test "pr23372d"
+run_dump_test "pr23372d-x32"
 run_dump_test "pr23486a"
 run_dump_test "pr23486a-x32"
 run_dump_test "pr23486b"
 run_dump_test "pr23486b-x32"
+run_dump_test "pr23486c"
+run_dump_test "pr23486c-x32"
+run_dump_test "pr23486d"
+run_dump_test "pr23486d-x32"
 
 if { ![istarget "x86_64-*-linux*"] && ![istarget "x86_64-*-nacl*"]} {
     return