public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Don't warn on .attach_to_group to same group
@ 2023-07-26  0:43 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-07-26  0:43 UTC (permalink / raw)
  To: binutils

	* config/obj-elf.c (obj_elf_attach_to_group): Don't warn if
	group name matches current group for section.

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;
     }
 

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-26  0:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26  0:43 Don't warn on .attach_to_group to same group Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).