[v2] gas: Clarify documentation about @ and % usage in .section
Checks
Commit Message
In the documentation for the .section Assembler Directive for the ELF
format, clarify the instances where @ and % can be used.
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
---
v2: Update text based on mailing list discussion.
gas/doc/as.texi | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
On 22.05.2026 12:08, Will Hawkins wrote:
> In the documentation for the .section Assembler Directive for the ELF
> format, clarify the instances where @ and % can be used.
>
> Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
> ---
> v2: Update text based on mailing list discussion.
>
> gas/doc/as.texi | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Okay, and thanks. I take that this will need committing on your behalf?
Jan
> --- a/gas/doc/as.texi
> +++ b/gas/doc/as.texi
> @@ -7121,9 +7121,10 @@ some targets extend this list with their own types
> Many targets only support the first three section types. The type may be
> enclosed in double quotes if necessary.
>
> -Note on targets where the @code{@@} character is the start of a comment (eg
> -ARM) then another character is used instead. For example the ARM port uses the
> -@code{%} character.
> +Note - certain targets treat @code{@@} as the start of a comment (e.g., ARM).
> +On such platforms, @code{%} is used instead. On platforms where neither
> +@code{@@} nor @code{%} indicate the start of a comment, @code{@@} and
> +@code{%} may be used interchangeably.
>
> Note - some sections, eg @code{.text} and @code{.data} are considered to be
> special and have fixed types. Any attempt to declare them with a different
On Fri, May 22, 2026 at 6:12 AM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 22.05.2026 12:08, Will Hawkins wrote:
> > In the documentation for the .section Assembler Directive for the ELF
> > format, clarify the instances where @ and % can be used.
> >
> > Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
> > ---
> > v2: Update text based on mailing list discussion.
> >
> > gas/doc/as.texi | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
>
> Okay, and thanks. I take that this will need committing on your behalf?
Yes, thank you!!
I appreciate you being so open to an update to the docs. I hope it
helps "Future Me".
Will
>
> Jan
>
> > --- a/gas/doc/as.texi
> > +++ b/gas/doc/as.texi
> > @@ -7121,9 +7121,10 @@ some targets extend this list with their own types
> > Many targets only support the first three section types. The type may be
> > enclosed in double quotes if necessary.
> >
> > -Note on targets where the @code{@@} character is the start of a comment (eg
> > -ARM) then another character is used instead. For example the ARM port uses the
> > -@code{%} character.
> > +Note - certain targets treat @code{@@} as the start of a comment (e.g., ARM).
> > +On such platforms, @code{%} is used instead. On platforms where neither
> > +@code{@@} nor @code{%} indicate the start of a comment, @code{@@} and
> > +@code{%} may be used interchangeably.
> >
> > Note - some sections, eg @code{.text} and @code{.data} are considered to be
> > special and have fixed types. Any attempt to declare them with a different
>
@@ -7121,9 +7121,10 @@ some targets extend this list with their own types
Many targets only support the first three section types. The type may be
enclosed in double quotes if necessary.
-Note on targets where the @code{@@} character is the start of a comment (eg
-ARM) then another character is used instead. For example the ARM port uses the
-@code{%} character.
+Note - certain targets treat @code{@@} as the start of a comment (e.g., ARM).
+On such platforms, @code{%} is used instead. On platforms where neither
+@code{@@} nor @code{%} indicate the start of a comment, @code{@@} and
+@code{%} may be used interchangeably.
Note - some sections, eg @code{.text} and @code{.data} are considered to be
special and have fixed types. Any attempt to declare them with a different