Start mass upgrade
[dragora.git] / patches / binutils / 2.35 / binutils-attach-to-group.patch
blob216401123c007173d6d4c471b5c6b55ef6f5c6cc
1 diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.34/gas/config/obj-elf.c
2 --- binutils.orig/gas/config/obj-elf.c 2020-02-02 11:34:11.858321477 +0000
3 +++ binutils-2.34/gas/config/obj-elf.c 2020-02-02 11:34:30.099247619 +0000
4 @@ -78,9 +78,11 @@ static void obj_elf_gnu_attribute (int);
5 static void obj_elf_tls_common (int);
6 static void obj_elf_lcomm (int);
7 static void obj_elf_struct (int);
8 +static void obj_elf_attach_to_group (int);
10 static const pseudo_typeS elf_pseudo_table[] =
12 + {"attach_to_group", obj_elf_attach_to_group, 0},
13 {"comm", obj_elf_common, 0},
14 {"common", obj_elf_common, 1},
15 {"ident", obj_elf_ident, 0},
16 @@ -1003,6 +1005,27 @@ obj_elf_section_name (void)
17 return name;
20 +static void
21 +obj_elf_attach_to_group (int dummy ATTRIBUTE_UNUSED)
23 + const char * gname = obj_elf_section_name ();
25 + if (gname == NULL)
26 + {
27 + as_warn ("group name not parseable");
28 + return;
29 + }
31 + if (elf_group_name (now_seg))
32 + {
33 + as_warn ("already has a group");
34 + return;
35 + }
37 + elf_group_name (now_seg) = xstrdup (gname);
38 + elf_section_flags (now_seg) |= SHF_GROUP;
41 void
42 obj_elf_section (int push)
44 Only in binutils-2.34/gas/config: obj-elf.c.orig
45 diff -rup binutils.orig/gas/doc/as.texi binutils-2.34/gas/doc/as.texi
46 --- binutils.orig/gas/doc/as.texi 2020-02-02 11:34:11.850321509 +0000
47 +++ binutils-2.34/gas/doc/as.texi 2020-02-02 11:35:11.359080560 +0000
48 @@ -4359,6 +4359,7 @@ Some machine configurations provide addi
49 * Altmacro:: @code{.altmacro}
50 * Ascii:: @code{.ascii "@var{string}"}@dots{}
51 * Asciz:: @code{.asciz "@var{string}"}@dots{}
52 +* Attach_to_group:: @code{.attach_to_group @var{name}}
53 * Balign:: @code{.balign [@var{abs-expr}[, @var{abs-expr}]]}
54 * Bundle directives:: @code{.bundle_align_mode @var{abs-expr}}, etc
55 * Byte:: @code{.byte @var{expressions}}
56 @@ -4656,6 +4657,12 @@ trailing zero byte) into consecutive add
57 @code{.asciz} is just like @code{.ascii}, but each string is followed by
58 a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''.
60 +@node Attach_to_group
61 +@section @code{.attach_to_group @var{name}}
62 +Attaches the current section to the named group. This is like declaring
63 +the section with the @code{G} attribute, but can be done after the section
64 +has been created.
66 @node Balign
67 @section @code{.balign[wl] [@var{abs-expr}[, @var{abs-expr}[, @var{abs-expr}]]]}
69 Only in binutils-2.34/gas/doc: as.texi.orig
70 Only in binutils-2.34/gas/doc: as.texi.rej