binutils Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
gas

Gas: Clarify documentation about @ and % usage in .section directive

The assembler documentation now clearly explains when to use '@' or '%' for section directives.

The documentation for the .section assembler directive in the ELF format was updated to clarify when to use the @ and % characters. Some targets treat @ as the start of a comment (e.g., ARM), and on those platforms, % should be used instead. On platforms where neither @ nor % start a comment, they can be used interchangeably.

In Details

The @ character is often used to specify additional flags or attributes for a section. Clarifying the usage of @ and % in the .section directive ensures correct assembler behavior across different target architectures. The ARM port uses % instead of @ to avoid conflicts with comment syntax.

For Context

The assembler translates human-readable assembly code into machine code. Assembler directives are special commands that control the assembly process, such as defining sections in the output file using .section. The @ character has special meaning in some assembly languages, often used to denote comments or addressing modes. This change clarifies the correct character to use in .section directives across different architectures to avoid conflicts.

Filed Under: assemblerdocumentationELFARM