[PATCH] gas: Add AArch64 Windows SEH (pdata/xdata) support

Jan Beulich jbeulich@suse.com
Thu Aug 6 06:06:14 GMT 2026


On 05.08.2026 19:53, coshvji cujmlqef wrote:
> Hi. The previous patch has other bugs that would break seh on x86_64 so
> they are not the same patch,

Please can you comment then on that patch? Re-starting from scratch is an
option if the other one is excessively broken, yet even then comments
given there on earlier versions would want taking into account in such a
full re-do.

Jan

> the first one needs to be discarded + i did
> not use git send-email because the 587 port was blocked so i resubmitted it
> again. Not deliberately try to insult other devs.
> 
> Best wishes
> 
> On Wed, Aug 5, 2026 at 1:52 PM Jan Beulich <jbeulich@suse.com> wrote:
> 
>> On 04.08.2026 20:02, trcrsired wrote:
>>> Implement Windows exception-handling (SEH) unwind info generation for
>>> the aarch64-w64-mingw32 target in GAS.
>>>
>>> The existing obj-coff-seh.c only handled x64.  This adds full AArch64
>>> support:
>>>
>>> * .seh_proc/.seh_endprologue and all AArch64 unwind directives
>>>   (.seh_alloc_stack, .seh_save_fplr/x, .seh_save_reg/p/p_x,
>>>   .seh_save_freg/p/p_x, .seh_save_lrpair, .seh_set_fp, .seh_add_fp,
>>>   .seh_handler, etc.)
>>> * Correct xdata header layout (FunctionLength / CodeWords / EpilogCount /
>>>   E / X bits) matching the MS ARM64 format
>>> * Emit the xdata extension word when CodeWords==0 and EpilogCount==0 so
>>>   Windows exception parsers do not misread the next entry
>>> * Correct opcode encodings for register save pairs (save_regp etc.)
>>> * Function length computed from fragment positions instead of
>>>   resolve_expression, which failed across fragments
>>
>> This submission is a little irritating, because work towards the same
>> goal is already at v12 [1]. Furthermore, work like this would require
>> an S-o-b of yours, in turn (I think) requiring a real name.
>>
>> Jan
>>
>> [1] https://sourceware.org/pipermail/binutils/2026-July/150254.html
>>
> 



More information about the Binutils mailing list