diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elfxx-aarch64.c | 32 | ||||
-rw-r--r-- | bfd/format.c | 20 | ||||
-rw-r--r-- | bfd/version.h | 2 |
3 files changed, 27 insertions, 27 deletions
diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 45a0205..68e004ef 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -930,28 +930,20 @@ _bfd_aarch64_elf_link_setup_gnu_properties (struct bfd_link_info *info) GNU properties (if found). */ bfd *pbfd = _bfd_elf_link_setup_gnu_properties (info); - /* If pbfd has any GNU_PROPERTY_AARCH64_FEATURE_1_AND properties, update - outprop accordingly. */ if (pbfd != NULL) { - /* 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 = p->next) - { - /* This merge of features should happen only once as all the identical - properties are supposed to have been merged at this stage by - _bfd_elf_link_setup_gnu_properties(). */ - if (p->property.pr_type == GNU_PROPERTY_AARCH64_FEATURE_1_AND) - { - outprop = (p->property.u.number - & (GNU_PROPERTY_AARCH64_FEATURE_1_BTI - | GNU_PROPERTY_AARCH64_FEATURE_1_PAC - | GNU_PROPERTY_AARCH64_FEATURE_1_GCS)); - break; - } - } + elf_property_list *p; + elf_property_list *plist = elf_properties (pbfd); + + /* If pbfd has any GNU_PROPERTY_AARCH64_FEATURE_1_AND properties, update + outprop accordingly. */ + if ((p = _bfd_elf_find_property (plist, + GNU_PROPERTY_AARCH64_FEATURE_1_AND, NULL)) + != NULL) + outprop = p->property.u.number + & (GNU_PROPERTY_AARCH64_FEATURE_1_BTI + | GNU_PROPERTY_AARCH64_FEATURE_1_PAC + | GNU_PROPERTY_AARCH64_FEATURE_1_GCS); } tdata->gnu_property_aarch64_feature_1_and = outprop; diff --git a/bfd/format.c b/bfd/format.c index 3db0792..a909b70 100644 --- a/bfd/format.c +++ b/bfd/format.c @@ -470,7 +470,18 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) /* Avoid clashes with bfd_cache_close_all running in another thread. */ if (!bfd_cache_set_uncloseable (abfd, true, &old_in_format_matches)) - return false; + { + free (matching_vector); + return false; + } + + /* Locking is required here in order to manage _bfd_section_id. */ + if (!bfd_lock ()) + { + bfd_cache_set_uncloseable (abfd, old_in_format_matches, NULL); + free (matching_vector); + return false; + } /* Presume the answer is yes. */ abfd->format = format; @@ -480,10 +491,6 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) of an archive. */ orig_messages = _bfd_set_error_handler_caching (&messages); - /* Locking is required here in order to manage _bfd_section_id. */ - if (!bfd_lock ()) - return false; - preserve_match.marker = NULL; if (!bfd_preserve_save (abfd, &preserve, NULL)) goto err_ret; @@ -779,7 +786,8 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) out: if (preserve_match.marker != NULL) bfd_preserve_finish (abfd, &preserve_match); - bfd_preserve_restore (abfd, &preserve); + if (preserve.marker != NULL) + bfd_preserve_restore (abfd, &preserve); _bfd_restore_error_handler_caching (orig_messages); print_and_clear_messages (&messages, PER_XVEC_NO_TARGET); bfd_cache_set_uncloseable (abfd, old_in_format_matches, NULL); diff --git a/bfd/version.h b/bfd/version.h index e797ad0..9ddeb48 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -16,7 +16,7 @@ In releases, the date is not included in either version strings or sonames. */ -#define BFD_VERSION_DATE 20250417 +#define BFD_VERSION_DATE 20250421 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ |