https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=fdcd893b9998762c42e4b9f4401ccd08dff10bea
commit fdcd893b9998762c42e4b9f4401ccd08dff10bea Author: Radek Bartoň <[email protected]> AuthorDate: Mon Jun 9 08:45:27 2025 +0200 Commit: Corinna Vinschen <[email protected]> CommitDate: Mon Jul 14 13:42:02 2025 +0200 Cygwin: mkimport: port to support AArch64 This patch ports winsup/cygwin/scripts/mkimport script to AArch64, namely implements relocation to the imp_sym. Signed-off-by: Radek Bartoň <[email protected]> Diff: --- winsup/cygwin/scripts/mkimport | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/winsup/cygwin/scripts/mkimport b/winsup/cygwin/scripts/mkimport index 9517c4e9e1d9..0c1bcafbf8b1 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;
