aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elfxx-x86.c17
2 files changed, 19 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1cadfc4..44690b8 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-x86.c (_bfd_x86_elf_parse_gnu_properties): Mask out the
+ GNU_PROPERTY_X86_UINT32_VALID bit.
+ (_bfd_x86_elf_link_fixup_gnu_properties): Set the
+ GNU_PROPERTY_X86_UINT32_VALID bit for non-relocatable output.
+
2018-08-23 Zenith423 <zenith432@users.sourceforge.net>
PR 23460
diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c
index 1a4c723..0d91e4d 100644
--- a/bfd/elfxx-x86.c
+++ b/bfd/elfxx-x86.c
@@ -2378,8 +2378,10 @@ _bfd_x86_elf_parse_gnu_properties (bfd *abfd, unsigned int type,
return property_corrupt;
}
prop = _bfd_elf_get_property (abfd, type, datasz);
- /* Combine properties of the same type. */
- prop->u.number |= bfd_h_get_32 (abfd, ptr);
+ /* Mask out GNU_PROPERTY_X86_UINT32_VALID and combine properties
+ of the same type. */
+ prop->u.number |= (bfd_h_get_32 (abfd, ptr)
+ & ~GNU_PROPERTY_X86_UINT32_VALID);
prop->pr_kind = property_number;
break;
@@ -2963,9 +2965,8 @@ error_alignment:
/* Fix up x86 GNU properties. */
void
-_bfd_x86_elf_link_fixup_gnu_properties
- (struct bfd_link_info *info ATTRIBUTE_UNUSED,
- elf_property_list **listp)
+_bfd_x86_elf_link_fixup_gnu_properties (struct bfd_link_info *info,
+ elf_property_list **listp)
{
elf_property_list *p;
@@ -2981,6 +2982,12 @@ _bfd_x86_elf_link_fixup_gnu_properties
*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;
+
listp = &p->next;
break;
default: