aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-07-22 08:14:38 +0930
committerAlan Modra <amodra@gmail.com>2023-07-26 10:04:31 +0930
commit0d8e39f5ce5530cf548ca8a70ff19a34991e43cb (patch)
treedde5f2bce62c89b0ae61747352c442f7c1bf6a86 /gas/config/obj-elf.c
parentfafcbd14a7e562a3449728cfa78caa8a640dc402 (diff)
downloadgdb-0d8e39f5ce5530cf548ca8a70ff19a34991e43cb.zip
gdb-0d8e39f5ce5530cf548ca8a70ff19a34991e43cb.tar.gz
gdb-0d8e39f5ce5530cf548ca8a70ff19a34991e43cb.tar.bz2
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.
Diffstat (limited to 'gas/config/obj-elf.c')
-rw-r--r--gas/config/obj-elf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c
index 753a929..dc05b35 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;
}