On Tue, 24 Jun 2025, Radek Barton via Cygwin-patches wrote:

> Hello.
>
> This change defines  `___CTOR_LIST__`  and `___DTOR_LIST__` for AArch64 in 
> the same way as for x86_x64 as AArch64 uses `pei-aarch64-little` and x86_x64 
> uses `pei-x86-64` COFF formats, which both are defined at 
> https://github.com/Windows-on-ARM-Experiments/binutils-woarm64/blob/woarm64/ld/scripttempl/pep.sc#L159
>  resp. 
> https://github.com/Windows-on-ARM-Experiments/binutils-woarm64/blob/woarm64/ld/emultempl/pep.em.
>
> Radek
>
> ---
> From 1dc5dbeb5e8b9f2783ceddc7dcf227bc7b922e08 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Radek=20Barto=C5=88?= <[email protected]>
> Date: Fri, 6 Jun 2025 14:12:28 +0200
> Subject: [PATCH] Cygwin: define ___CTOR_LIST__  and ___DTOR_LIST__ for AArch64
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Signed-off-by: Radek BartoĊˆ <[email protected]>
> ---
>  winsup/cygwin/cygwin.sc.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/winsup/cygwin/cygwin.sc.in b/winsup/cygwin/cygwin.sc.in
> index 69526f5d8..5007a3694 100644
> --- a/winsup/cygwin/cygwin.sc.in
> +++ b/winsup/cygwin/cygwin.sc.in
> @@ -17,7 +17,7 @@ SECTIONS
>      *(SORT(.text$*))
>      *(.glue_7t)
>      *(.glue_7)
> -#ifdef __x86_64__
> +#if defined(__x86_64__) || defined(__aarch64__)
>      . = ALIGN(8);
>       ___CTOR_LIST__ = .; __CTOR_LIST__ = .;
>                       LONG (-1); LONG (-1); *(SORT(.ctors.*)); *(.ctors); 
> *(.ctor); LONG (0); LONG (0);
> --
> 2.49.0.vfs.0.4

LGTM

Reply via email to