[PATCH] ld: aarch64: Fix scanning of GNU properties for AARCH64_FEATURE_1_AND
Yury Khrustalev
yury.khrustalev@arm.com
Thu Mar 27 17:09:28 GMT 2025
Fixes [1]. Previously iteration over GNU properties of an input file
could stop before reaching GNU_PROPERTY_AARCH64_FEATURE_1_AND which
would result in incorrect inference of properties of the output file.
In the particular use case described in [1], the memory seal property
GNU_PROPERTY_MEMORY_SEAL with number 3, if present in the input file,
prevented reading information from GNU_PROPERTY_AARCH64_FEATURE_1_AND
property due to filtering by property number.
[1] PR32818 https://sourceware.org/bugzilla/show_bug.cgi?id=32818
---
Regression tested on AArch64 and no regressions found. OK for trunk?
base commit: 08ed5584d87
---
bfd/elfxx-aarch64.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c
index 45a02058e81..072e8de7bf8 100644
--- a/bfd/elfxx-aarch64.c
+++ b/bfd/elfxx-aarch64.c
@@ -936,8 +936,7 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info)
{
/* The property list is sorted in order of type. */
for (elf_property_list *p = elf_properties (pbfd);
- (p != NULL)
- && (GNU_PROPERTY_AARCH64_FEATURE_1_AND <= p->property.pr_type);
+ (p != NULL);
p = p->next)
{
/* This merge of features should happen only once as all the identical
--
2.39.5
More information about the Binutils
mailing list