aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-x86-64.c
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/elf64-x86-64.c
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/elf64-x86-64.c')
-rw-r--r--bfd/elf64-x86-64.c3
1 files changed, 2 insertions, 1 deletions
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;