aboutsummaryrefslogtreecommitdiff
path: root/gas/doc/as.texi
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-10-01 16:34:05 +0100
committerNick Clifton <nickc@redhat.com>2020-10-01 16:34:05 +0100
commit642f545a93326f570ef4718e9a26c29285943f27 (patch)
treefef880554b171346c1ddb02e7d3be2788c06de97 /gas/doc/as.texi
parent1f22ee1f72385731cc6511de3b6f1b51c163ecb9 (diff)
downloadbinutils-642f545a93326f570ef4718e9a26c29285943f27.zip
binutils-642f545a93326f570ef4718e9a26c29285943f27.tar.gz
binutils-642f545a93326f570ef4718e9a26c29285943f27.tar.bz2
Add new directive to GAS: .attach_to_group.
* config/obj-elf (elf_pseudo_table): Add attach_to_group. (obj_elf_attach_to_group): New function. * doc/as.texi: Document the new directive. * NEWS: Mention the new feature. * testsuite/gas/elf/attach-1.s: New test. * testsuite/gas/elf/attach-1.d: New test driver. * testsuite/gas/elf/attach-2.s: New test. * testsuite/gas/elf/attach-2.d: New test driver. * testsuite/gas/elf/attach-err.s: New test. * testsuite/gas/elf/attach-err.d: New test driver. * testsuite/gas/elf/attach-err.err: New test error output. * testsuite/gas/elf/elf.exp: Run the new tests.
Diffstat (limited to 'gas/doc/as.texi')
-rw-r--r--gas/doc/as.texi12
1 files changed, 11 insertions, 1 deletions
diff --git a/gas/doc/as.texi b/gas/doc/as.texi
index b88c1f9..c0baa94 100644
--- a/gas/doc/as.texi
+++ b/gas/doc/as.texi
@@ -4362,6 +4362,7 @@ Some machine configurations provide additional directives.
* Altmacro:: @code{.altmacro}
* Ascii:: @code{.ascii "@var{string}"}@dots{}
* Asciz:: @code{.asciz "@var{string}"}@dots{}
+* Attach_to_group:: @code{.attach_to_group @var{name}}
* Balign:: @code{.balign [@var{abs-expr}[, @var{abs-expr}]]}
* Bundle directives:: @code{.bundle_align_mode @var{abs-expr}}, etc
* Byte:: @code{.byte @var{expressions}}
@@ -4663,6 +4664,13 @@ trailing zero byte) into consecutive addresses.
@code{.asciz} is just like @code{.ascii}, but each string is followed by
a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''.
+@node Attach_to_group
+@section @code{.attach_to_group @var{name}}
+Attaches the current section to the named group. This is like declaring
+the section with the @code{G} attribute, but can be done after the section
+has been created. Note if the group section does not exist at the point that
+this directive is used then it will be created.
+
@node Balign
@section @code{.balign[wl] [@var{abs-expr}[, @var{abs-expr}[, @var{abs-expr}]]]}
@@ -6663,7 +6671,9 @@ a few exceptions to this rule however. Processor and application specific
flags can be added to an already defined section. The @code{.interp},
@code{.strtab} and @code{.symtab} sections can have the allocate flag
(@code{a}) set after they are initially defined, and the @code{.note-GNU-stack}
-section may have the executable (@code{x}) flag added.
+section may have the executable (@code{x}) flag added. Also note that the
+@code{.attach_to_group} directive can be used to add a section to a group even
+if the section was not originally declared to be part of that group.
The optional @var{type} argument may contain one of the following constants: