[PATCH v2] gas: support for .pushsection and .popsection pseudo ops for coff

Project / Subsystem

binutils / gas

Date

2026-07-24

Proposer

Johannes Khoshnazar-Thoma <johannes@johannesthoma.com>

Source type

public_inbox

Consensus

Proposed

Sentiment

8/10

Technical tradeoffs

  • Reusing code from ELF for COFF simplifies development but may not perfectly map all semantics if underlying format differences are significant.
  • Adding support for these directives enables cross-platform compilation scenarios, increasing flexibility for kernel developers targeting Windows.

All attributes

project
binutils
subsystem
gas
patch_id
discussion_id
20260724122850.469382-2-johannes@johannesthoma.com
source_type
public_inbox
title
[PATCH v2] gas: support for .pushsection and .popsection pseudo ops for coff
headline
gas: support for .pushsection and .popsection pseudo ops for coff
tldr
Adds support for .pushsection and .popsection directives to the COFF object file format in the gas assembler.
proposer
Johannes Khoshnazar-Thoma <johannes@johannesthoma.com>
consensus
Proposed
outcome
proposed
sentiment_score
8
technical_tradeoffs
  • Reusing code from ELF for COFF simplifies development but may not perfectly map all semantics if underlying format differences are significant.
  • Adding support for these directives enables cross-platform compilation scenarios, increasing flexibility for kernel developers targeting Windows.
series_id
series_role
standalone
series_parts
[]
tags
  • assembler
  • binutils
  • gas
  • COFF
  • section management
bugzilla_url
date
2026-07-24T00:00:00.000Z

[PATCH v2] gas: support for .pushsection and .popsection pseudo ops for coff

This patch adds support for the .pushsection and .popsection pseudo-operations to the GNU Assembler (gas) when generating COFF object files. These directives are heavily used in current Linux kernels compiled as ELF, and this change enables the Linux kernel to be compiled as a COFF object for Windows/ReactOS drivers. The implementation was copied from the ELF object code, and includes a new test case.