Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elfxx-x86.c
index d6b851ce780d5a6a157cea587e746d46eddb9b48..5703b5f389a0fafd4a086c22c357d060a6c042a1 100644 (file)
@@ -2401,6 +2401,7 @@ _bfd_x86_elf_parse_gnu_properties (bfd *abfd, unsigned int type,
 bfd_boolean
 _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
                                   bfd *abfd ATTRIBUTE_UNUSED,
+                                  bfd *bbfd ATTRIBUTE_UNUSED,
                                   elf_property *aprop,
                                   elf_property *bprop)
 {
@@ -2496,6 +2497,9 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
        }
       else
        {
+         /* There should be no AND properties since some input doesn't
+            have them.  Set IBT and SHSTK properties for -z ibt and -z
+            shstk if needed.  */
          features = 0;
          if (info->ibt)
            features = GNU_PROPERTY_X86_FEATURE_1_IBT;
@@ -2503,18 +2507,15 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info,
            features |= GNU_PROPERTY_X86_FEATURE_1_SHSTK;
          if (features)
            {
-             /* Add GNU_PROPERTY_X86_FEATURE_1_IBT and
-                GNU_PROPERTY_X86_FEATURE_1_SHSTK.  */
              if (aprop != NULL)
                {
-                 number = aprop->u.number;
-                 aprop->u.number = number | features;
-                 updated = number != (unsigned int) aprop->u.number;
+                 updated = features != (unsigned int) aprop->u.number;
+                 aprop->u.number = features;
                }
              else
                {
-                 bprop->u.number |= features;
                  updated = TRUE;
+                 bprop->u.number = features;
                }
            }
          else if (aprop != NULL)
This page took 0.023759 seconds and 4 git commands to generate.