[PATCH v9 03/19] Object Attributes v2: new abstractions for subsections and attributes
Matthieu Longo
matthieu.longo@arm.com
Tue Nov 4 17:51:33 GMT 2025
On 29/10/2025 14:01, Jan Beulich wrote:
>> /* Note: The comparison of the encoding and optionality of subsections
>> is entirely arbitrary. The numeric values could be completely flipped
>> around without any effect. Likewise, assigning higher priority to
>> optionality than to encoding is artificial. The desired
>> properties for
>> this comparison operator are reflexivity, transitivity, antisymmetry,
>> and totality, in order to achieve a total ordering when sorting a
>> collection of subsections.
>> If the nature of this ordering were to change in the future, it would
>> have no impact on the final merged result in the output file.
> "no impact" as in what the words say, or "no functional impact" (but e.g.
> testsuite expectations might still need adjusting)? Asking specifically
> because of ...
>
No functional impact, but as you mentioned, some adjustment might be
required in the testsuite if the orders of subsections or attributes
would change.
Changed in the next revision to:
If the nature of this ordering were to change in the future, it would
have no functional impact (but e.g. testsuite expectations might still
need adjusting) on the final merged result ...
>> Only the
>> order of the serialized subsections would differ, which does not
>> affect
>> the interpretation of the object attributes.
> ... this further sentence.
>
>> Similarly, the ordering of subsections and attributes in an input file
>> does not affect the merge process in ld. The merge process never
>> assumes
>> any particular ordering from the input files, it always sorts the
>> subsections and attributes before merging. This means that using an
>> older version of gas with a newer ld is safe.
> Hopefully also the other way around (as long a no new features are used
> that the older ld didn't know of)?
>
> Jan
Yes.
Changed the sentence to:
This means that using an older version of gas with a newer ld is safe,
and vice versa as long as no new features are used that the older ld
doesn't know of.
Matthieu
More information about the Binutils
mailing list