Re: [PATCH v2] gas: support for .pushsection and .popsection pseudo ops for coff
Johannes Khoshnazar-Thoma <[email protected]> Fri, 31 Jul 2026 13:22:52 +0200
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
Am 31.07.26 um 11:58 schrieb Jan Beulich:
> On 24.07.2026 14:28, Johannes Khoshnazar-Thoma wrote:
>> @@ -1898,6 +1932,8 @@ static const pseudo_typeS coff_pseudo_table[] =3D
>> {"ident", obj_coff_ident, 0},
>> {"line", obj_coff_line, 0},
>> {"ln", obj_coff_ln, 0},
>> + {"pushsection", obj_coff_section, 1},
>> + {"popsection", obj_coff_popsection, 0},
>> {"scl", obj_coff_scl, 0},
>> {"sect", obj_coff_section, 0},
>> {"sect.s", obj_coff_section, 0},
>=20
> While now you insert at the right spot, what you insert is still the wro=
ng
> way round. Beyond this things look okay now as far as these two directiv=
es
> go, but (to re-state the obvious) support for .previous is still missing=
.
>=20
> Jan
Hi Jan, Maciej,
Thank you for looking at my patch. I will address your concerns,
but I have a question regarding .previous support: in the obj_elf.c
code there is a obj_elf_section_change_hook() function which is
also called at many places in the processor-specific backends
(and also from read.c). Implementing .previous would require
adding a obj_coff_section_change_hook() to be called when
anyone changes the section in other files, am I right? Or is
it not necessary in the coff case to have such a hook?
How would I identify backends that have coff support? And how
would I be able to test all those backends?
- Johannes