]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: bfd_set_section_alignment errors.
authorAlan Modra <amodra@gmail.com>
Tue, 18 Feb 2025 00:54:27 +0000 (11:24 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 18 Feb 2025 00:56:55 +0000 (11:26 +1030)
Fix another one for aarch64.

bfd/elfxx-aarch64.c

index 04c65a01788807c4c4eae119cf8d095f121f5fdf..2c2424c41dbdb83dcc824238c799e007b9382b67 100644 (file)
@@ -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;
 }