Hello.

This patch allows to build `winsup/utils/profiler.cc 
b/winsup/utils/profiler.cc`for AArch64.

Radek

---
>From 15fc1370c28c2d0214021f940fc1a62a6309576a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Barto=C5=88?= <[email protected]>
Date: Tue, 10 Jun 2025 17:11:20 +0200
Subject: [PATCH] Cygwin: profiler: port to AArch64
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Radek BartoĊˆ <[email protected]>
---
 winsup/utils/profiler.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/winsup/utils/profiler.cc b/winsup/utils/profiler.cc
index b5ce16cf2..4fe900b7f 100644
--- a/winsup/utils/profiler.cc
+++ b/winsup/utils/profiler.cc
@@ -503,8 +503,10 @@ find_text_section (LPVOID base, HANDLE h)

   read_child ((void *) &machine, sizeof (machine),
               &inth->FileHeader.Machine, h);
-#ifdef __x86_64__
+#if defined(__x86_64__)
   if (machine != IMAGE_FILE_MACHINE_AMD64)
+#elif defined(__aarch64__)
+  if (machine != IMAGE_FILE_MACHINE_ARM64)
 #else
 #error unimplemented for this target
 #endif
--
2.49.0.vfs.0.4

Attachment: 0001-Cygwin-profiler-port-to-AArch64.patch
Description: 0001-Cygwin-profiler-port-to-AArch64.patch

Reply via email to