[v2] gas: Clarify documentation about @ and % usage in .section

Message ID 20260522100809.829774-1-hawkinsw@obs.cr
State New
Headers
Series [v2] gas: Clarify documentation about @ and % usage in .section |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

Will Hawkins May 22, 2026, 10:08 a.m. UTC
  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

Jan Beulich May 22, 2026, 10:12 a.m. UTC | #1
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
  
Will Hawkins May 22, 2026, 11:10 a.m. UTC | #2
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
>
  

Patch

diff --git a/gas/doc/as.texi b/gas/doc/as.texi
index 3e1d2d0e254..5c80a3100dc 100644
--- 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