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

Will Hawkins hawkinsw@obs.cr
Fri May 22 10:08:06 GMT 2026


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(-)

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
-- 
2.49.0



More information about the Binutils mailing list