gas: Add AArch64 Windows SEH (pdata/xdata) support
Adds AArch64 Windows exception handling support to the GAS assembler.
This patch introduces support for Windows Structured Exception Handling (SEH) in the GNU Assembler (GAS) for the AArch64 architecture targeting Windows (aarch64-w64-mingw32). It extends existing SEH handling logic, which previously only supported x64, to include AArch64-specific unwind directives, correct xdata header layout, and accurate function length calculation. This enables GAS to generate correct SEH unwind information for AArch64 Windows executables.
- proposer
Submits a patch to implement Windows SEH unwind info generation for AArch64 in GAS, extending existing x64 support.
“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:”
In Details
This patch adds AArch64 support for Windows Structured Exception Handling (SEH) to GAS, the GNU Assembler. Previously, GAS's SEH handling in obj-coff-seh.c was limited to x64 targets. This change enables the generation of SEH unwind information (pdata and xdata) for AArch64 targets running Windows, including handling AArch64-specific directives and ensuring correct format compatibility with Microsoft's ARM64 SEH specification.
- GAS
- The GNU Assembler, part of the GNU Binutils suite, which translates assembly language code into object files.
- AArch64
- The 64-bit ARM architecture.
- SEH
- Structured Exception Handling. A mechanism in Windows for handling runtime errors and exceptions.
- pdata/xdata
- Data structures used in Windows executables to describe how to unwind the stack during exception handling. pdata typically contains function length and flags, while xdata provides detailed unwind information.
- unwind info
- Information embedded in an executable that describes how to restore the caller's stack frame when a function returns or an exception is handled.
- mingw32
- Minimalist GNU for Windows. A development environment that allows the use of GNU tools (like GCC and Binutils) to create Windows applications.