https://git.reactos.org/?p=reactos.git;a=commitdiff;h=149d22d8575c28e002c64a...
commit 149d22d8575c28e002c64aaf45c94bc01db6f4bf Author: Mark Jansen mark.jansen@reactos.org AuthorDate: Sun Dec 23 22:37:45 2018 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Fri Jan 4 20:33:26 2019 +0100
[VERIFIER] Remove stub special case, since our normal 'stub' code no longer links against kernel32 --- dll/win32/verifier/CMakeLists.txt | 6 +- dll/win32/verifier/verifier.spec | 35 ++++---- dll/win32/verifier/verifier_customstubs.c | 143 ------------------------------ 3 files changed, 20 insertions(+), 164 deletions(-)
diff --git a/dll/win32/verifier/CMakeLists.txt b/dll/win32/verifier/CMakeLists.txt index d41a850cdb..df2c1b6896 100644 --- a/dll/win32/verifier/CMakeLists.txt +++ b/dll/win32/verifier/CMakeLists.txt @@ -3,10 +3,10 @@ spec2def(verifier.dll verifier.spec)
list(APPEND SOURCE verifier.c - verifier_customstubs.c - ${CMAKE_CURRENT_BINARY_DIR}/verifier.def) + ${CMAKE_CURRENT_BINARY_DIR}/verifier.def + ${CMAKE_CURRENT_BINARY_DIR}/verifier_stubs.c)
add_library(verifier SHARED ${SOURCE}) set_module_type(verifier win32dll UNICODE ENTRYPOINT DllMain 12) -add_importlibs(verifier ntdll) +add_importlibs(verifier ntdll) # Only ntdll! add_cd_file(TARGET verifier DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/verifier/verifier.spec b/dll/win32/verifier/verifier.spec index 03d81b8b69..befa3a9823 100644 --- a/dll/win32/verifier/verifier.spec +++ b/dll/win32/verifier/verifier.spec @@ -1,19 +1,18 @@ -# Do not add stubs here!
-@ stdcall VerifierAddFreeMemoryCallback(ptr) # stub -@ stdcall VerifierCreateRpcPageHeap(ptr ptr ptr ptr ptr ptr) # stub -@ stdcall VerifierDeleteFreeMemoryCallback(ptr) # stub -@ stdcall VerifierDestroyRpcPageHeap(ptr) # stub -@ stdcall VerifierDisableFaultInjectionExclusionRange(ptr) # stub -@ stdcall VerifierDisableFaultInjectionTargetRange(ptr) # stub -@ stdcall VerifierEnableFaultInjectionExclusionRange(ptr ptr) # stub -@ stdcall VerifierEnableFaultInjectionTargetRange(ptr ptr) # stub -@ stdcall VerifierEnumerateResource(ptr ptr ptr ptr ptr) # stub -@ stdcall VerifierIsCurrentThreadHoldingLocks() # stub -@ stdcall VerifierIsDllEntryActive(ptr) # stub -@ cdecl VerifierLogMessage() # stub -@ stdcall VerifierQueryRuntimeFlags(ptr ptr) # stub -@ stdcall VerifierSetFaultInjectionProbability(ptr ptr) # stub -@ stdcall VerifierSetFlags(ptr ptr ptr) # stub -@ stdcall VerifierSetRuntimeFlags(ptr) # stub -@ stdcall VerifierStopMessage(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) # stub +@ stub VerifierAddFreeMemoryCallback +@ stub VerifierCreateRpcPageHeap +@ stub VerifierDeleteFreeMemoryCallback +@ stub VerifierDestroyRpcPageHeap +@ stub VerifierDisableFaultInjectionExclusionRange +@ stub VerifierDisableFaultInjectionTargetRange +@ stub VerifierEnableFaultInjectionExclusionRange +@ stub VerifierEnableFaultInjectionTargetRange +@ stub VerifierEnumerateResource +@ stub VerifierIsCurrentThreadHoldingLocks +@ stub VerifierIsDllEntryActive +@ stub VerifierLogMessage +@ stub VerifierQueryRuntimeFlags +@ stub VerifierSetFaultInjectionProbability +@ stub VerifierSetFlags +@ stub VerifierSetRuntimeFlags +@ stub VerifierStopMessage diff --git a/dll/win32/verifier/verifier_customstubs.c b/dll/win32/verifier/verifier_customstubs.c deleted file mode 100644 index 20302b3549..0000000000 --- a/dll/win32/verifier/verifier_customstubs.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * PROJECT: Application verifier - * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) - * PURPOSE: Custom stubs, using only ntdll functions - * COPYRIGHT: Copyright 2018 Mark Jansen (mark.jansen@reactos.org) - */ - -#define WIN32_NO_STATUS -#include <ndk/rtlfuncs.h> - -#define EXCEPTION_WINE_STUB 0x80000100 - -#define __wine_spec_unimplemented_stub(module, function) \ -{ \ - EXCEPTION_RECORD ExceptionRecord = {0}; \ - ExceptionRecord.ExceptionRecord = NULL; \ - ExceptionRecord.ExceptionCode = EXCEPTION_WINE_STUB; \ - ExceptionRecord.ExceptionFlags = EXCEPTION_NONCONTINUABLE; \ - ExceptionRecord.ExceptionInformation[0] = (ULONG_PTR)module; \ - ExceptionRecord.ExceptionInformation[1] = (ULONG_PTR)function; \ - ExceptionRecord.NumberParameters = 2; \ - RtlRaiseException(&ExceptionRecord); \ -} - -int NTAPI VerifierAddFreeMemoryCallback(PVOID arg0) -{ - DbgPrint("WARNING: calling stub VerifierAddFreeMemoryCallback(%p)\n", arg0); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierCreateRpcPageHeap(PVOID arg0, PVOID arg1, PVOID arg2, PVOID arg3, PVOID arg4, PVOID arg5) -{ - DbgPrint("WARNING: calling stub VerifierCreateRpcPageHeap(%p, %p, %p, %p, %p, %p)\n", arg0, arg1, arg2, arg3, arg4, arg5); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierDeleteFreeMemoryCallback(PVOID arg0) -{ - DbgPrint("WARNING: calling stub VerifierDeleteFreeMemoryCallback(%p)\n", arg0); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierDestroyRpcPageHeap(PVOID arg0) -{ - DbgPrint("WARNING: calling stub VerifierDestroyRpcPageHeap(%p)\n", arg0); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierDisableFaultInjectionExclusionRange(PVOID arg0) -{ - DbgPrint("WARNING: calling stub VerifierDisableFaultInjectionExclusionRange(%p)\n", arg0); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierDisableFaultInjectionTargetRange(PVOID arg0) -{ - DbgPrint("WARNING: calling stub VerifierDisableFaultInjectionTargetRange(%p)\n", arg0); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierEnableFaultInjectionExclusionRange(PVOID arg0, PVOID arg1) -{ - DbgPrint("WARNING: calling stub VerifierEnableFaultInjectionExclusionRange(%p, %p)\n", arg0, arg1); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierEnableFaultInjectionTargetRange(PVOID arg0, PVOID arg1) -{ - DbgPrint("WARNING: calling stub VerifierEnableFaultInjectionTargetRange(%p, %p)\n", arg0, arg1); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierEnumerateResource(PVOID arg0, PVOID arg1, PVOID arg2, PVOID arg3, PVOID arg4) -{ - DbgPrint("WARNING: calling stub VerifierEnumerateResource(%p, %p, %p, %p, %p)\n", arg0, arg1, arg2, arg3, arg4); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierIsCurrentThreadHoldingLocks() -{ - DbgPrint("WARNING: calling stub VerifierIsCurrentThreadHoldingLocks()\n"); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierIsDllEntryActive(PVOID arg0) -{ - DbgPrint("WARNING: calling stub VerifierIsDllEntryActive(%p)\n", arg0); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int __cdecl VerifierLogMessage() -{ - DbgPrint("WARNING: calling stub VerifierLogMessage()\n"); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierQueryRuntimeFlags(PVOID arg0, PVOID arg1) -{ - DbgPrint("WARNING: calling stub VerifierQueryRuntimeFlags(%p, %p)\n", arg0, arg1); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierSetFaultInjectionProbability(PVOID arg0, PVOID arg1) -{ - DbgPrint("WARNING: calling stub VerifierSetFaultInjectionProbability(%p, %p)\n", arg0, arg1); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierSetFlags(PVOID arg0, PVOID arg1, PVOID arg2) -{ - DbgPrint("WARNING: calling stub VerifierSetFlags(%p, %p, %p)\n", arg0, arg1, arg2); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierSetRuntimeFlags(PVOID arg0) -{ - DbgPrint("WARNING: calling stub VerifierSetRuntimeFlags(%p)\n", arg0); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} - -int NTAPI VerifierStopMessage(PVOID arg0, PVOID arg1, PVOID arg2, PVOID arg3, PVOID arg4, PVOID arg5, PVOID arg6, PVOID arg7, PVOID arg8, PVOID arg9) -{ - DbgPrint("WARNING: calling stub VerifierStopMessage(%p, %p, %p, %p, %p, %p, %p, %p, %p, %p)\n", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); - __wine_spec_unimplemented_stub("verifier.dll", __FUNCTION__); - return 0; -} -