driver: move init-only functions into INIT segment
Reference: https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/writing-a-driverentry-routine Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
71e1ab6940
commit
f19945b3c6
@ -838,6 +838,12 @@ cleanup:
|
|||||||
return DidClose;
|
return DidClose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_Must_inspect_result_
|
||||||
|
static NTSTATUS TunInitializeDispatchSecurityDescriptor(VOID);
|
||||||
|
#ifdef ALLOC_PRAGMA
|
||||||
|
# pragma alloc_text(INIT, TunInitializeDispatchSecurityDescriptor)
|
||||||
|
#endif
|
||||||
|
_Use_decl_annotations_
|
||||||
static NTSTATUS TunInitializeDispatchSecurityDescriptor(VOID)
|
static NTSTATUS TunInitializeDispatchSecurityDescriptor(VOID)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
@ -1451,6 +1457,9 @@ TunUnload(PDRIVER_OBJECT DriverObject)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DRIVER_INITIALIZE DriverEntry;
|
DRIVER_INITIALIZE DriverEntry;
|
||||||
|
#ifdef ALLOC_PRAGMA
|
||||||
|
# pragma alloc_text(INIT, DriverEntry)
|
||||||
|
#endif
|
||||||
_Use_decl_annotations_
|
_Use_decl_annotations_
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
DriverEntry(DRIVER_OBJECT *DriverObject, UNICODE_STRING *RegistryPath)
|
DriverEntry(DRIVER_OBJECT *DriverObject, UNICODE_STRING *RegistryPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user