[PATCH v3] Cygwin: SEH: Fix crash and handle second unwind phase on AArch64

Igor Podgainoi Igor.Podgainoi@arm.com
Tue Apr 7 17:24:55 GMT 2026


Hi Corinna,

On Mar 31 15:51, Corinna Vinschen wrote:
> Do we actually *need* the .seh_code on x86_64, or would it be sufficient
> to change this to .text for both targets?

No, as the SEH metadata is defined in the .text section just like the
preceding code, there should be no functional difference between them
on x86_64. As far as I can tell, this is largely a matter of style -
for example, LLVM does not appear to reference .seh_code anywhere in
its codebase.

The latest proposed AArch64 SEH implementation in binutils does not
support the .seh_code directive at this stage.

As for the original reason for the introduction of this directive,
the binutils commit 3c6256d29e2c528880a3cf8df43adf32c7780de5 from
2014-03-25 by Nick Clifton <nickc@redhat.com> explicitly states:
> This is helpful because the code section may not be .text.

So it seems to have been initially used for convenience.

Regards,
Igor Podgainoi
Arm


More information about the Cygwin-patches mailing list