Don't warn on .attach_to_group to same group

* config/obj-elf.c (obj_elf_attach_to_group): Don't warn if
	group name matches current group for section.
This commit is contained in:
Alan Modra 2023-07-22 08:14:38 +09:30
parent fafcbd14a7
commit 0d8e39f5ce

View File

@ -1088,8 +1088,9 @@ obj_elf_attach_to_group (int dummy ATTRIBUTE_UNUSED)
if (elf_group_name (now_seg))
{
as_warn (_("section %s already has a group (%s)"),
bfd_section_name (now_seg), elf_group_name (now_seg));
if (strcmp (elf_group_name (now_seg), gname) != 0)
as_warn (_("section %s already has a group (%s)"),
bfd_section_name (now_seg), elf_group_name (now_seg));
return;
}