[Bug 51377] New: Driver binaries cross-compiled with MinGW (PE) have 'IMAGE_FILE_DLL' image characteristics set
WineHQ Bugzilla
wine-bugs at winehq.org
Thu Jul 1 03:54:15 CDT 2021
https://bugs.winehq.org/show_bug.cgi?id=51377
Bug ID: 51377
Summary: Driver binaries cross-compiled with MinGW (PE) have
'IMAGE_FILE_DLL' image characteristics set
Product: Wine
Version: 6.11
Hardware: x86-64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P2
Component: -unknown
Assignee: wine-bugs at winehq.org
Reporter: focht at gmx.net
Distribution: ---
Hello folks,
while investigating bug 51375 ("SCM erroneously tries to start 64-bit kernel
drivers as 32-bit service due to incorrect handling of 'IMAGE_FILE_DLL' image
characteristics in 'kernel32.dll.GetBinaryTypeW' (Protect DiSC
'acedrv11.sys'))", I've found another discrepancy:
--- snip ---
$ pwd
/home/focht/.wine/drive_c/windows/system32/drivers
$ file *
acedrv11.sys: PE32+ executable (native) x86-64, for MS Windows
etc: directory
fltmgr.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
hidclass.sys: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
http.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
ksecdd.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
mountmgr.sys: PE32+ executable (native) x86-64, for MS Windows
ndis.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
netio.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
nsiproxy.sys: PE32+ executable (native) x86-64, for MS Windows
scsiport.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
tdi.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
usbd.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
winebus.sys: PE32+ executable (native) x86-64, for MS Windows
winehid.sys: PE32+ executable (DLL) (native) x86-64, for MS Windows
wineusb.sys: PE32+ executable (native) x86-64, for MS Windows
--- snip ---
All driver binaries which have been cross-compiled with MinGW (PE) have
'IMAGE_FILE_DLL' image characteristics set which is rather unusual.
--- snip ---
$ winedump http.sys
Contents of http.sys: 49152 bytes
*** This is a Wine builtin DLL ***
File Header
Machine: 8664 (AMD64)
Number of Sections: 6
TimeDateStamp: 60DC03A9 (Wed Jun 30 07:39:53 2021) offset 128
PointerToSymbolTable: 00000000
NumberOfSymbols: 00000000
SizeOfOptionalHeader: 00F0
Characteristics: 2022
EXECUTABLE_IMAGE
LARGE_ADDRESS_AWARE
DLL
...
--- snip ---
Real native and Wine builtin 'fake' drivers are fine.
https://source.winehq.org/git/wine.git/blob/0ec555e58ea9d5b33f4c825e96965ad0cb15d00f:/dlls/nsiproxy.sys/Makefile.in
--- snip ---
1 MODULE = nsiproxy.sys
2 IMPORTS = ntoskrnl uuid
3 EXTRADLLFLAGS = -Wl,--subsystem,native
--- snip ---
vs.
https://source.winehq.org/git/wine.git/blob/0ec555e58ea9d5b33f4c825e96965ad0cb15d00f:/dlls/http.sys/Makefile.in
--- snip ---
1 MODULE = http.sys
2 IMPORTS = ntoskrnl ws2_32
3 EXTRADLLFLAGS = -Wl,--subsystem,native -mno-cygwin
--- snip ---
This doesn't cause a problem in shared WoW64 prefixes under Linux but still
could be addressed.
$ wine --version
wine-6.11-235-g7f1623bc626
Regards
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list