[VERIFIER] Remove stub special case, since our normal 'stub' code no longer links against kernel32

This commit is contained in:
Mark Jansen 2018-12-23 22:37:45 +01:00
parent b3399c68e9
commit 149d22d857
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B
3 changed files with 20 additions and 164 deletions

View file

@ -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)

View file

@ -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

View file

@ -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;
}