[PATCH] x86: Don't remove empty x86 properties
H.J. Lu
hjl.tools@gmail.com
Tue Nov 27 20:18:00 GMT 2018
On Tue, Nov 27, 2018 at 12:06 PM Cary Coutant <ccoutant@gmail.com> wrote:
>
> > > GNU_PROPERTY_X86_ISA_1_USED bits can be all zero when only
> > > base x86 instructions are used. Linker shouldn't remove properties
> > > with zero bits.
>
> Yet in another patch, you are removing properties:
It will be updated.
> > > To me this is a confusing message. How about simply saying "Removed
> > > property 0xc0000002 in foo.o (0x1)", and similarly for the other
> > > messages where properties are removed. If ld is removing them then it
> > > isn't merging them.
> >
> > This misses the crucial info that property 0xc0000002 is removed due to
> > bar.o (None).
>
> You still haven't explained the difference between a missing property
> and one that is all zeroes. Do you *really* think it's a good idea to
> make a distinction?
>
How about this
GNU_PROPERTY_X86_UINT32_AND_LO..GNU_PROPERTY_X86_UINT32_AND_HI
A bit in the output pr_data field is set only if it is set in all
relocatable input pr_data
fields. If all bits in the the output pr_data field are zero, this
property should be
removed from output.
GNU_PROPERTY_X86_UINT32_OR_LO..GNU_PROPERTY_X86_UINT32_OR_HI
A bit in the output pr_data field is set if it is set in any
relocatable input pr_data
fields. If all bits in the the output pr_data field are zero, this
property should be
removed from output.
GNU_PROPERTY_X86_UINT32_OR_AND_LO..GNU_PROPERTY_X86_UINT32_OR_AND_HI
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 may have any values. When all bits in the the
output pr_data
field are zero, this property should not be removed from output.
--
H.J.
More information about the Binutils
mailing list