x86: Don't remove empty GNU_PROPERTY_X86_UINT32_OR_AND properties
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 4 Dec 2018 14:00:57 +0000 (06:00 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 4 Dec 2018 14:01:14 +0000 (06:01 -0800)
commitfde51dd189a1f8a63896bcb845ef36ea5e1917d5
tree04aefd91f07745df41d7d60ebeebde6ce2008fac
parentf4238194a211a6a27598a7fdf9ad63f9b5d6fbaa
x86: Don't remove empty GNU_PROPERTY_X86_UINT32_OR_AND properties

For GNU_PROPERTY_X86_COMPAT_ISA_1_USED and GNU_PROPERTY_X86_UINT32_OR_AND
properties, a bit in the output pr_data field is set if it is set in any
relocatable input pr_data fields and this property is present in all
relocatable input files.  A missing property implies that its bits have
unknown values.  When all bits in the the output pr_data field are zero,
this property should not be removed from output to indicate it has zero
in all bits.

bfd/

PR ld/23372
* elfxx-x86.c (_bfd_x86_elf_merge_gnu_properties): Don't remove
empty properties for GNU_PROPERTY_X86_COMPAT_ISA_1_USED and
GNU_PROPERTY_X86_UINT32_OR_AND.
(_bfd_x86_elf_link_fixup_gnu_properties): Likewise.

ld/

PR ld/23372
* testsuite/ld-i386/pr23372a.d: Updated.
* testsuite/ld-i386/pr23372c.d: Likewise.
* testsuite/ld-x86-64/pr23372a-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372a.d: Likewise.
* testsuite/ld-x86-64/pr23372c-x32.d: Likewise.
* testsuite/ld-x86-64/pr23372c.d: Likewise.
bfd/ChangeLog
bfd/elfxx-x86.c
ld/ChangeLog
ld/testsuite/ld-i386/pr23372a.d
ld/testsuite/ld-i386/pr23372c.d
ld/testsuite/ld-x86-64/pr23372a-x32.d
ld/testsuite/ld-x86-64/pr23372a.d
ld/testsuite/ld-x86-64/pr23372c-x32.d
ld/testsuite/ld-x86-64/pr23372c.d
This page took 0.02608 seconds and 4 git commands to generate.