[PATCH] gas: Document @ and % as interchangeable for type argument in .section
Will Hawkins
hawkinsw@obs.cr
Sat May 16 00:38:04 GMT 2026
In the .section Assembler Directive for the ELF format, both the % and
the @ can be used when writing the type argument. Clarify the documentation.
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
---
gas/doc/as.texi | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/gas/doc/as.texi b/gas/doc/as.texi
index 3e1d2d0e254..201d9c26b7d 100644
--- a/gas/doc/as.texi
+++ b/gas/doc/as.texi
@@ -7118,13 +7118,12 @@ a numeric value to be set as the ELF section header's type field.
some targets extend this list with their own types
@end table
+Note - the @code{%} character may be used instead of the @code{@@} character
+when writing the @var{type} argument constant.
+
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 - 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
type will generate an error from the assembler.
--
2.49.0
More information about the Binutils
mailing list