From 0d8e39f5ce5530cf548ca8a70ff19a34991e43cb Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 22 Jul 2023 08:14:38 +0930 Subject: [PATCH] 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. --- gas/config/obj-elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 753a929fb14..dc05b35ee99 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -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; } -- 2.30.2