[PATCH] ld: aarch64: Fix scanning of GNU properties for AARCH64_FEATURE_1_AND
Yury Khrustalev
yury.khrustalev@arm.com
Tue Apr 1 09:29:31 GMT 2025
On Tue, Apr 01, 2025 at 10:21:19AM +0100, Matthieu Longo wrote:
> On 2025-03-27 17:09, Yury Khrustalev wrote:
> > Fixes [1]. Previously iteration over GNU properties of an input file
>
> ...
>
> This loop is run after _bfd_elf_link_setup_gnu_properties which should
> already have merged and sorted the GNU properties.
>
> Consequently, GNU_PROPERTY_MEMORY_SEAL (=0x3) should be located before
> GNU_PROPERTY_AARCH64_FEATURE_1_AND (=0xc0000000), and the shortcut exit
> condition of the loop should still be valid.
Why do we need this condition in the first place?
```
GNU_PROPERTY_AARCH64_FEATURE_1_AND <= p->property.pr_type
```
Why do we need to stop the loop as soon as we reach the property with the
number more than `AARCH64_FEATURE_1_AND` (thus depending on the order of
properties)?
More information about the Binutils
mailing list