From: Alan Modra Date: Tue, 18 Feb 2025 00:54:27 +0000 (+1030) Subject: Re: bfd_set_section_alignment errors. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3bb7d3ea813c9e4d7e60d83b293d34a2390a4122;p=thirdparty%2Fbinutils-gdb.git Re: bfd_set_section_alignment errors. Fix another one for aarch64. --- diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 04c65a01788..2c2424c41db 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -743,12 +743,11 @@ _bfd_aarch64_elf_create_gnu_property_section (struct bfd_link_info *info, | SEC_READONLY | SEC_HAS_CONTENTS | SEC_DATA)); - if (sec == NULL) - info->callbacks->fatal (_("%P: failed to create GNU property section\n")); - unsigned align = (bfd_get_mach (ebfd) & bfd_mach_aarch64_ilp32) ? 2 : 3; - if (!bfd_set_section_alignment (sec, align)) - info->callbacks->fatal (_("%pA: failed to align section\n"), sec); + if (sec == NULL + || !bfd_set_section_alignment (sec, align)) + info->callbacks->fatal (_("%P: failed to create %s\n"), + NOTE_GNU_PROPERTY_SECTION_NAME); elf_section_type (sec) = SHT_NOTE; }