On Jul 10 09:24, Radek Barton via Cygwin-patches wrote: > >From e5060aa9afc7346301b7f394515d7a280b3c703d Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Radek=20Barto=C5=88?= <radek.bar...@microsoft.com> > Date: Mon, 9 Jun 2025 08:45:27 +0200 > Subject: [PATCH v2] Cygwin: mkimport: port to support AArch64 > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > This patch ports winsup/cygwin/scripts/mkimport script to AArch64, namely > implements relocation to the imp_sym. > > Signed-off-by: Radek BartoĊ <radek.bar...@microsoft.com> > --- > winsup/cygwin/scripts/mkimport | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/winsup/cygwin/scripts/mkimport b/winsup/cygwin/scripts/mkimport > index 9517c4e9e..0c1bcafbf 100755 > --- a/winsup/cygwin/scripts/mkimport > +++ b/winsup/cygwin/scripts/mkimport > @@ -24,6 +24,7 @@ my %import = (); > my %symfile = (); > > my $is_x86_64 = ($cpu eq 'x86_64' ? 1 : 0); > +my $is_aarch64 = ($cpu eq 'aarch64' ? 1 : 0); > # FIXME? Do other (non-32 bit) arches on Windows still use symbol prefixes? > my $sym_prefix = ''; > > @@ -65,6 +66,16 @@ for my $f (keys %text) { > .global $glob_sym > $glob_sym: > jmp *$imp_sym(%rip) > +EOF > + } elsif ($is_aarch64) { > + print $as_fd <<EOF; > + .text > + .extern $imp_sym > + .global $glob_sym > +$glob_sym: > + adr x16, $imp_sym > + ldr x16, [x16] > + br x16 > EOF > } else { > print $as_fd <<EOF; > -- > 2.50.1.vfs.0.0 >
Pushed. Thanks, Corinna