aarch64: add the aarch64-pc-cygwin target
Adds aarch64-pc-cygwin target to binutils, based on existing Windows on Arm toolchain patches.
Dennis Ameling proposes adding the aarch64-pc-cygwin target to binutils, BFD, GAS, and LD. This series is based on existing downstream patches from the Windows on Arm GNU toolchain. The primary change refines linker DLL characteristics to correctly handle AArch64 Cygwin binaries, which have specific relocation and ASLR requirements distinct from existing mingw targets. The proposal includes tests to ensure no regressions are introduced.
- proposer
Submits a series of patches to add the aarch64-pc-cygwin target, detailing changes to linker DLL characteristics and test configurations.
In Details
This series adds a new target triplet, aarch64-pc-cygwin, to binutils. It involves modifications in BFD, GAS, and LD to accommodate Cygwin's PE/COFF environment on AArch64. The key change is in ld/emultempl/pep.em, where the default DLL characteristics are precisely controlled to meet AArch64 Cygwin's requirements for relocatability (DYNAMIC_BASE) and to disable high-entropy ASLR (HIGH_ENTROPY_VA), which differs from existing mingw targets. This ensures compatibility with Cygwin's runtime loader.
- PE/COFF
- Portable Executable/Common Object File Format, a file format used for executables, object code, and DLLs in Windows systems. It's also used by MinGW and Cygwin.
- BFD
- The Binary File Descriptor library, a component of GNU Binutils used for reading and writing object file formats.
- GAS
- The GNU Assembler, part of GNU Binutils, responsible for assembling source code into machine code.
- LD
- The GNU linker, part of GNU Binutils, responsible for combining object files and libraries into an executable or shared library.
- DYNAMIC_BASE
- A linker flag that enables Address Space Layout Randomization (ASLR) for executables and DLLs, making them relocatable at load time.
- HIGH_ENTROPY_VA
- A linker flag that enhances ASLR by using a larger entropy pool for address randomization, increasing security but potentially incompatible with older systems or specific runtime environments.