From: Adhemerval Zanella Date: Mon, 24 Feb 2025 16:27:33 +0000 (-0300) Subject: elf: Handle multiple object with GNU_PROPERTY_MEMORY_SEAL X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f5e2c066bac9ad51d89f159925f9760423be2f7;p=thirdparty%2Fbinutils-gdb.git elf: Handle multiple object with GNU_PROPERTY_MEMORY_SEAL Fixes and issue when glibc is build with ld that enables memory sealing by default. Change-Id: I0c9a6a0f39c291390472a1752f85d8ec2010b9b4 TODO: add tests. --- diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c index 07ab38098e6..43301e6beb4 100644 --- a/bfd/elf-properties.c +++ b/bfd/elf-properties.c @@ -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. */