binutils Newspaper
OCTOBER 6, 2026
gas — Proposed

gas: support for .previous, .pushsection and .popsection pseudo ops for coff

Addresses review comments on adding .previous, .pushsection, and .popsection to gas for COFF targets.

Johannes Khoshnazar-Thoma responds to review comments on a patch that adds support for .previous, .pushsection, and .popsection pseudo-operations to the gas assembler for COFF targets. He expresses uncertainty about the necessity of xcoff patches given the predefined sections in xcoff, but believes they are needed. The author is seeking further feedback and offering to make additional changes.

In the Thread 2 participants
  1. Johannes Khoshnazar-Thoma <johannes@johannesthoma.com> proposer

    Has addressed review comments and is seeking clarification on xcoff patches, as well as further feedback.

    “Thanks for the comments, I think I have addressed all of them. I am still not sure about the xcoff patches, looking at the code, they are needed but on the other hand with xcoff there are only predefined sections (as I read in a comment). Please let me know if I can do anything else at the moment,”
  2. Jan Beulich reviewer

    Provided several review comments on the patch, including omitting NEWS entries, using NULL for pointer comparisons, and suggesting `static` for certain variables.

    “This wants omitting; it's added as part of making a release. static? NULL please when comparing against a pointer.”

Technical Tradeoffs

  • Adds section management capabilities to gas for COFF.
  • Potential complexity in handling xcoff's predefined section structure.

In Details

This email is a follow-up to a patch series introducing .previous, .pushsection, and .popsection directives to GNU as (gas) for COFF targets. These directives manage section stacking, allowing more flexible section manipulation, akin to their ELF counterparts. The author is seeking confirmation on the necessity of specific xcoff-related patches, as xcoff has a more rigid section definition compared to ELF.

For Context
gas
GNU Assembler, the assembler used in the GNU toolchain.
COFF
Common Object File Format. A file format for executables, object code, and libraries, primarily used on Windows systems.
pseudo-ops
Assembler directives that do not generate machine code but control the assembly process, such as defining sections or symbols.
.previous
A gas pseudo-op that restores the previously active section.
.pushsection
A gas pseudo-op that saves the current section and then activates a new section.
.popsection
A gas pseudo-op that restores the section that was most recently saved by .pushsection.
xcoff
An extended version of COFF, used on some Unix systems like AIX, known for its predefined section structure.
Filed Under: binutilsgasCOFFassembler directives