summaryrefslogtreecommitdiff
path: root/bfd/section.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2002-06-04 01:05:21 +0000
committerAlan Modra <amodra@bigpond.net.au>2002-06-04 01:05:21 +0000
commit85289e194a25eefc38b9bbd76375d04385a00751 (patch)
tree8930eb7e80c089b4af80edaf08d89c2d15f5a378 /bfd/section.c
parent28d6676c8a48b6c8b842b91150634833fa121d97 (diff)
downloadgdb-85289e194a25eefc38b9bbd76375d04385a00751.tar.gz
* elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
(bfd_section_from_shdr): Likewise. Set section name of group sections from signature. (group_signature): Split out from setup_group. Ensure symbol table is available. (bfd_elf_discard_group): New function. (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on .gnu.linkonce* sections if they are members of a group. (set_group_contents): Set GRP_COMDAT flag. * section.c (bfd_discard_group): New function. * bfd-in.h (bfd_elf_discard_group): Declare. * bfd-in2.h: Regenerate. * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field. (elf_linkonce_p): Define.
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/bfd/section.c b/bfd/section.c
index 358f5c4f0be..70c7f27d029 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -1375,3 +1375,24 @@ _bfd_strip_section_from_output (info, s)
s->flags |= SEC_EXCLUDE;
}
+
+/*
+FUNCTION
+ bfd_discard_group
+
+SYNOPSIS
+ void bfd_discard_group (bfd *abfd, asection *group);
+
+DESCRIPTION
+ Remove all members of @var{group} from the output.
+*/
+
+void
+bfd_discard_group (abfd, group)
+ bfd *abfd;
+ asection *group;
+{
+ if ((group->flags & SEC_GROUP) != 0
+ && abfd->xvec->flavour == bfd_target_elf_flavour)
+ bfd_elf_discard_group (abfd, group);
+}