Re: [PATCH] gas: support for .pushsection and .popsection pseudo ops for coff
Jan Beulich <[email protected]> Fri, 24 Jul 2026 10:01:56 +0200
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
On 18.07.2026 18:22, Johannes Khoshnazar-Thoma wrote: > Current Linux kernels make heavy use of the .pushsection and > .popsection pseudo ops. Normally, the Linux kernel is built > as an ELF object, where the assembler supports those pseudo > ops. When compiling the Linux kernel as a Windows/ReactOS > driver however, it must be compiled as a COFF object, since > the Windows/ReactOS kernel does not know how to load ELF > binaries. > > In order to be able to compile the Linux kernel as a COFF > object (and further on as a PE32 native executable) the > implementation of those pseudo ops has been copiied from > the obj-elf.c support code to the obj-coff.c support code. > It has been verified that the Linux kernel works without > assembler errors when using an assembler with this patch. > > Signed-off-by: Johannes Khoshnazar-Thoma <[email protected]> > --- > gas/config/obj-coff.c | 41 ++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 40 insertions(+), 1 deletion(-) Oh, one other remark: There will want to be at least a minimal testcase for the two new directives. Jan