aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-properties.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2019-06-24 11:08:40 -0700
committerH.J. Lu <hjl.tools@gmail.com>2019-06-24 11:08:57 -0700
commitf93ab3a0b8039a1667a666f013cca50b03d67f9b (patch)
tree21a6d5b3201ec8ac98a911549a7da13fa960115b /bfd/elf-properties.c
parent164e3873cf41d01a9a67396575dceef7489cee64 (diff)
downloadgdb-f93ab3a0b8039a1667a666f013cca50b03d67f9b.zip
gdb-f93ab3a0b8039a1667a666f013cca50b03d67f9b.tar.gz
gdb-f93ab3a0b8039a1667a666f013cca50b03d67f9b.tar.bz2
elf: Remove the property after reporting its removal
commit d2ef37ebd9f771d06edf1fdea37970f60b242b2d Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri Dec 7 08:30:30 2018 -0800 elf: Report property change when merging properties failed to remove the property after reporting it has been removed. This patch corrects it. bfd/ PR ld/24721 * elf-properties.c (elf_merge_gnu_property_list): Remove the property after reporting property removal. ld/ PR ld/24721 * testsuite/ld-x86-64/x86-64.exp: Run PR ld/24721 tests. * testsuite/ld-x86-64/pr24721-x32.d: New file. * testsuite/ld-x86-64/pr24721.d: Likewise. * testsuite/ld-x86-64/pr24721.map: Likewise. * testsuite/ld-x86-64/pr24721a.s: Likewise. * testsuite/ld-x86-64/pr24721b.s: Likewise.
Diffstat (limited to 'bfd/elf-properties.c')
-rw-r--r--bfd/elf-properties.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c
index 94ef235..a297c9c 100644
--- a/bfd/elf-properties.c
+++ b/bfd/elf-properties.c
@@ -322,12 +322,10 @@ elf_merge_gnu_property_list (struct bfd_link_info *info, bfd *first_pbfd,
(bfd_vma) p->property.pr_type, first_pbfd, abfd);
}
}
- else
- {
- /* Remove this property. */
- *lastp = p->next;
- continue;
- }
+
+ /* Remove this property. */
+ *lastp = p->next;
+ continue;
}
else if (number_p)
{