[newlib-cygwin/main] Cygwin: PEHeaderFromHModule: drop architecture check
Corinna Vinschen via Cygwin-cvs <[email protected]> Mon, 2 Mar 2026 19:49:47 +0000 (GMT)
| Newsgroups | gmane.os.cygwin.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3f4ae584b2b05a968bad0598b03ca83245320af3 commit 3f4ae584b2b05a968bad0598b03ca83245320af3 Author: Corinna Vinschen <[email protected]> AuthorDate: Fri Feb 13 20:34:02 2026 +0100 Commit: Corinna Vinschen <[email protected]> CommitDate: Mon Mar 2 20:24:14 2026 +0100 Cygwin: PEHeaderFromHModule: drop architecture check We can only handle images which can be executed on the current architecture anyway, so this check is redundant. Signed-off-by: Corinna Vinschen <[email protected]> Diff: --- winsup/cygwin/hookapi.cc | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc index b0126ac04e3e..f554c20841fe 100644 --- a/winsup/cygwin/hookapi.cc +++ b/winsup/cygwin/hookapi.cc @@ -40,17 +40,6 @@ PEHeaderFromHModule (HMODULE hModule) if (pNTHeader->Signature != IMAGE_NT_SIGNATURE) return NULL; - /* Return valid PIMAGE_NT_HEADERS only for supported architectures. */ - switch (pNTHeader->FileHeader.Machine) - { - case IMAGE_FILE_MACHINE_AMD64: - break; - case IMAGE_FILE_MACHINE_ARM64: - break; - default: - return NULL; - } - return pNTHeader; }