]> git.ipfire.org Git - thirdparty/pciutils.git/commit
windows: Do not manually load ntdll.dll library
authorPali Rohár <pali@kernel.org>
Thu, 21 Nov 2024 23:36:29 +0000 (00:36 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 8 Jun 2025 15:19:58 +0000 (17:19 +0200)
commit76c06ea61b0b9555c7fddaaf4c8ef9abd46fa2c5
treedef7dcea059d49643a15d7b698d6832810f66dfb
parent39147c1081aff7445c105673fc5729c547d1d5b1
windows: Do not manually load ntdll.dll library

Per Windows Internals, Part 1, Image Loader section, the ntdll.dll library
is always loaded into every process on all NT systems.

So remove code which dynamically loads ntdll.dll library via LoadLibrary()
function and remove also code which changes error reporting mode (used just
for LoadLibrary) as both are not needed.

Also Microsoft C/C++ compilers optimize EXE applications in a way which
expects that the ntdll.dll library is loaded as the first module into the
process before the main EXE module itself.
lib/i386-io-windows.h
lib/physmem-windows.c
lib/win32-sysdbg.c