aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-05-12 08:07:21 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-05-12 08:07:43 -0700
commit73caa85d4a97eb991e581ccba3ff4eccce5e2e1d (patch)
tree60468868e4dce229990e7cc6499dc717419ae2a0 /bfd
parent6830f270e7b6676e7a77c1b8080941e35003d918 (diff)
downloadgdb-73caa85d4a97eb991e581ccba3ff4eccce5e2e1d.zip
gdb-73caa85d4a97eb991e581ccba3ff4eccce5e2e1d.tar.gz
gdb-73caa85d4a97eb991e581ccba3ff4eccce5e2e1d.tar.bz2
x86: Merge X86_ISA_1_USED/X86_ISA_1_NEEDED properties
If there are more than GNU property note in an input, we should merge X86_ISA_1_USED and X86_ISA_1_NEEDED properties. bfd/ * elf32-i386.c (elf_i386_parse_gnu_properties): Merge GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED properties. * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise. ld/ * testsuite/ld-i386/i386.exp: Run property-x86-3. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/property-x86-3.d: New file. * testsuite/ld-i386/property-x86-3.s: Likewise. * testsuite/ld-x86-64/property-x86-3.d: Likewise. * testsuite/ld-x86-64/property-x86-3.s: Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-i386.c3
-rw-r--r--bfd/elf64-x86-64.c3
3 files changed, 11 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9128808..bd7356c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2017-05-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_parse_gnu_properties): Merge
+ GNU_PROPERTY_X86_ISA_1_USED and GNU_PROPERTY_X86_ISA_1_NEEDED
+ properties.
+ * elf64-x86-64.c (elf_x86_64_parse_gnu_properties): Likewise.
+
2017-05-11 H.J. Lu <hongjiu.lu@intel.com>
* elf64-x86-64.c (elf_x86_64_link_hash_entry): Rename plt_bnd
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 6f59fb7..513e296 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -6362,7 +6362,8 @@ elf_i386_parse_gnu_properties (bfd *abfd, unsigned int type,
return property_corrupt;
}
prop = _bfd_elf_get_property (abfd, type, datasz);
- prop->u.number = bfd_h_get_32 (abfd, ptr);
+ /* Combine properties of the same type. */
+ prop->u.number |= bfd_h_get_32 (abfd, ptr);
prop->pr_kind = property_number;
break;
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index c77725d..1b93379 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -7003,7 +7003,8 @@ elf_x86_64_parse_gnu_properties (bfd *abfd, unsigned int type,
return property_corrupt;
}
prop = _bfd_elf_get_property (abfd, type, datasz);
- prop->u.number = bfd_h_get_32 (abfd, ptr);
+ /* Combine properties of the same type. */
+ prop->u.number |= bfd_h_get_32 (abfd, ptr);
prop->pr_kind = property_number;
break;