]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
elf: Handle multiple object with GNU_PROPERTY_MEMORY_SEAL
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 24 Feb 2025 16:27:33 +0000 (13:27 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 7 Mar 2025 11:47:55 +0000 (08:47 -0300)
Fixes and issue when glibc is build with ld that enables memory
sealing by default.

Change-Id: I0c9a6a0f39c291390472a1752f85d8ec2010b9b4
TODO: add tests.

bfd/elf-properties.c

index 07ab38098e6ab289343a5374438ea083d13e6aad..43301e6beb48372bd399169978a53223fbee274b 100644 (file)
@@ -786,8 +786,9 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info)
            }
        }
       else
-       elf_find_and_remove_property (&elf_properties (elf_bfd),
-                                     GNU_PROPERTY_MEMORY_SEAL, true);
+       for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
+         elf_find_and_remove_property (&elf_properties (abfd),
+                                       GNU_PROPERTY_MEMORY_SEAL, true);
     }
 
   /* Do nothing if there is no .note.gnu.property section.  */