diff options
Diffstat (limited to 'gas/config/obj-elf.c')
-rw-r--r-- | gas/config/obj-elf.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gas/config/obj-elf.c b/gas/config/obj-elf.c index 7cf921c051..d70400cec1 100644 --- a/gas/config/obj-elf.c +++ b/gas/config/obj-elf.c @@ -78,9 +78,11 @@ static void obj_elf_gnu_attribute (int); static void obj_elf_tls_common (int); static void obj_elf_lcomm (int); static void obj_elf_struct (int); +static void obj_elf_attach_to_group (int); static const pseudo_typeS elf_pseudo_table[] = { + {"attach_to_group", obj_elf_attach_to_group, 0}, {"comm", obj_elf_common, 0}, {"common", obj_elf_common, 1}, {"ident", obj_elf_ident, 0}, @@ -1003,6 +1005,27 @@ obj_elf_section_name (void) return name; } +static void +obj_elf_attach_to_group (int dummy ATTRIBUTE_UNUSED) +{ + const char * gname = obj_elf_section_name (); + + if (gname == NULL) + { + as_warn ("group name not parseable"); + return; + } + + if (elf_group_name (now_seg)) + { + as_warn ("already has a group"); + return; + } + + elf_group_name (now_seg) = xstrdup (gname); + elf_section_flags (now_seg) |= SHF_GROUP; +} + void obj_elf_section (int push) { |