From caaa37c1ac605ec49ac35f0372f9fbcc95cfee60 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Mon, 28 Nov 2005 23:25:31 +0000 Subject: [PATCH] - Support INIT section pragmas for msvc. Patch by Brezenbak. svn path=/trunk/; revision=19732 --- reactos/ntoskrnl/cc/view.c | 4 +++ reactos/ntoskrnl/cm/import.c | 4 +++ reactos/ntoskrnl/cm/registry.c | 7 ++++++ reactos/ntoskrnl/ex/callback.c | 5 ++++ reactos/ntoskrnl/ex/event.c | 4 +++ reactos/ntoskrnl/ex/evtpair.c | 4 +++ reactos/ntoskrnl/ex/init.c | 12 +++++++++ reactos/ntoskrnl/ex/lookas.c | 4 +++ reactos/ntoskrnl/ex/mutant.c | 4 +++ reactos/ntoskrnl/ex/profile.c | 4 +++ reactos/ntoskrnl/ex/sem.c | 4 +++ reactos/ntoskrnl/ex/time.c | 4 +++ reactos/ntoskrnl/ex/timer.c | 5 ++++ reactos/ntoskrnl/ex/uuid.c | 4 +++ reactos/ntoskrnl/ex/win32k.c | 4 +++ reactos/ntoskrnl/ex/work.c | 4 +++ reactos/ntoskrnl/fs/filelock.c | 5 ++++ reactos/ntoskrnl/fs/notify.c | 8 ++++-- reactos/ntoskrnl/fs/util.c | 5 ++++ reactos/ntoskrnl/inbv/inbv.c | 4 +++ reactos/ntoskrnl/io/arcname.c | 32 +++++++++++++++++++++++ reactos/ntoskrnl/io/bootlog.c | 4 +++ reactos/ntoskrnl/io/driver.c | 42 ++++++++++++++++++++++++++----- reactos/ntoskrnl/io/fs.c | 3 +++ reactos/ntoskrnl/io/iomgr.c | 12 +++++++++ reactos/ntoskrnl/io/plugplay.c | 3 +++ reactos/ntoskrnl/io/pnpmgr.c | 9 +++++++ reactos/ntoskrnl/io/pnpnotify.c | 5 ++++ reactos/ntoskrnl/io/vpb.c | 5 ++++ reactos/ntoskrnl/kd/kdinit.c | 5 ++++ reactos/ntoskrnl/ke/bug.c | 4 +++ reactos/ntoskrnl/ke/clock.c | 4 +++ reactos/ntoskrnl/ke/device.c | 5 ++++ reactos/ntoskrnl/ke/dpc.c | 5 ++++ reactos/ntoskrnl/ke/i386/exp.c | 5 ++++ reactos/ntoskrnl/ke/i386/kernel.c | 13 +++++++++- reactos/ntoskrnl/ke/i386/tss.c | 4 +++ reactos/ntoskrnl/ke/i386/vdm.c | 5 ++++ reactos/ntoskrnl/ke/main.c | 6 +++++ reactos/ntoskrnl/ke/usercall.c | 4 +++ reactos/ntoskrnl/ldr/loader.c | 6 +++++ reactos/ntoskrnl/lpc/port.c | 4 +++ reactos/ntoskrnl/mm/aspace.c | 5 ++++ reactos/ntoskrnl/mm/balance.c | 7 ++++++ reactos/ntoskrnl/mm/freelist.c | 6 +++++ reactos/ntoskrnl/mm/i386/page.c | 6 +++++ reactos/ntoskrnl/mm/marea.c | 4 +++ reactos/ntoskrnl/mm/mdl.c | 4 +++ reactos/ntoskrnl/mm/mminit.c | 9 +++++++ reactos/ntoskrnl/mm/npool.c | 4 +++ reactos/ntoskrnl/mm/pagefile.c | 5 ++++ reactos/ntoskrnl/mm/pageop.c | 5 ++++ reactos/ntoskrnl/mm/ppool.c | 4 +++ reactos/ntoskrnl/mm/process.c | 2 +- reactos/ntoskrnl/mm/rmap.c | 4 +++ reactos/ntoskrnl/mm/section.c | 7 +++++- reactos/ntoskrnl/ob/namespc.c | 5 ++++ reactos/ntoskrnl/ob/symlink.c | 4 +++ reactos/ntoskrnl/po/power.c | 5 ++++ reactos/ntoskrnl/ps/idle.c | 4 +++ reactos/ntoskrnl/ps/job.c | 6 +++++ reactos/ntoskrnl/ps/locale.c | 4 +++ reactos/ntoskrnl/ps/process.c | 3 ++- reactos/ntoskrnl/ps/psmgr.c | 11 ++++++++ reactos/ntoskrnl/rtl/nls.c | 9 +++++++ reactos/ntoskrnl/se/acl.c | 5 ++++ reactos/ntoskrnl/se/luid.c | 5 ++++ reactos/ntoskrnl/se/priv.c | 4 +++ reactos/ntoskrnl/se/sd.c | 5 ++++ reactos/ntoskrnl/se/semgr.c | 5 ++++ reactos/ntoskrnl/se/sid.c | 5 ++++ reactos/ntoskrnl/se/token.c | 5 ++++ 72 files changed, 429 insertions(+), 12 deletions(-) diff --git a/reactos/ntoskrnl/cc/view.c b/reactos/ntoskrnl/cc/view.c index be73d63410a..fb15002161c 100644 --- a/reactos/ntoskrnl/cc/view.c +++ b/reactos/ntoskrnl/cc/view.c @@ -36,6 +36,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, CcInitView) +#endif + /* GLOBALS *******************************************************************/ /* diff --git a/reactos/ntoskrnl/cm/import.c b/reactos/ntoskrnl/cm/import.c index 6de8ecf879e..a9da467013c 100644 --- a/reactos/ntoskrnl/cm/import.c +++ b/reactos/ntoskrnl/cm/import.c @@ -16,6 +16,10 @@ #include "cm.h" +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, CmImportHardwareHive) +#endif + /* GLOBALS ******************************************************************/ static BOOLEAN CmiHardwareHiveImported = FALSE; diff --git a/reactos/ntoskrnl/cm/registry.c b/reactos/ntoskrnl/cm/registry.c index c328abe37d3..c2cc4a238b8 100644 --- a/reactos/ntoskrnl/cm/registry.c +++ b/reactos/ntoskrnl/cm/registry.c @@ -16,6 +16,13 @@ #include "cm.h" +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, CmInitHives) +#pragma alloc_text(INIT, CmInitializeRegistry) +#pragma alloc_text(INIT, CmInit2) +#endif + + /* GLOBALS ******************************************************************/ POBJECT_TYPE CmiKeyType = NULL; diff --git a/reactos/ntoskrnl/ex/callback.c b/reactos/ntoskrnl/ex/callback.c index 093ccc7f7ec..a2df1a59dfa 100644 --- a/reactos/ntoskrnl/ex/callback.c +++ b/reactos/ntoskrnl/ex/callback.c @@ -12,6 +12,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeCallbacks) +#endif + + /* TYPES ********************************************************************/ /* Mapping for Callback Object */ diff --git a/reactos/ntoskrnl/ex/event.c b/reactos/ntoskrnl/ex/event.c index 563a95d197a..e798ecd7e8a 100644 --- a/reactos/ntoskrnl/ex/event.c +++ b/reactos/ntoskrnl/ex/event.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeEventImplementation) +#endif + /* GLOBALS *******************************************************************/ POBJECT_TYPE ExEventObjectType = NULL; diff --git a/reactos/ntoskrnl/ex/evtpair.c b/reactos/ntoskrnl/ex/evtpair.c index 698f56845bb..bc6693e1bcf 100644 --- a/reactos/ntoskrnl/ex/evtpair.c +++ b/reactos/ntoskrnl/ex/evtpair.c @@ -16,6 +16,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeEventPairImplementation) +#endif + /* GLOBALS *******************************************************************/ POBJECT_TYPE ExEventPairObjectType = NULL; diff --git a/reactos/ntoskrnl/ex/init.c b/reactos/ntoskrnl/ex/init.c index 642e8579800..ff5f5f193bc 100644 --- a/reactos/ntoskrnl/ex/init.c +++ b/reactos/ntoskrnl/ex/init.c @@ -32,6 +32,18 @@ BOOLEAN SetupMode = TRUE; VOID PspPostInitSystemProcess(VOID); +static VOID INIT_FUNCTION InitSystemSharedUserPage (PCSZ ParameterLine); +VOID INIT_FUNCTION ExpDisplayNotice(VOID); +INIT_FUNCTION NTSTATUS ExpLoadInitialProcess(PHANDLE ProcessHandle, PHANDLE ThreadHandle); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, InitSystemSharedUserPage) +#pragma alloc_text(INIT, ExpDisplayNotice) +#pragma alloc_text(INIT, ExpLoadInitialProcess) +#pragma alloc_text(INIT, ExpInitializeExecutive) +#pragma alloc_text(INIT, ExInit2) +#endif + /* FUNCTIONS ****************************************************************/ static diff --git a/reactos/ntoskrnl/ex/lookas.c b/reactos/ntoskrnl/ex/lookas.c index 4076a7e8086..e0b707527c9 100644 --- a/reactos/ntoskrnl/ex/lookas.c +++ b/reactos/ntoskrnl/ex/lookas.c @@ -15,6 +15,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitLookasideLists) +#endif + /* GLOBALS *******************************************************************/ LIST_ENTRY ExpNonPagedLookasideListHead; diff --git a/reactos/ntoskrnl/ex/mutant.c b/reactos/ntoskrnl/ex/mutant.c index e22cf846556..32f77e964ef 100644 --- a/reactos/ntoskrnl/ex/mutant.c +++ b/reactos/ntoskrnl/ex/mutant.c @@ -15,6 +15,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeMutantImplementation) +#endif + #ifndef MUTANT_INCREMENT #define MUTANT_INCREMENT 1 #endif diff --git a/reactos/ntoskrnl/ex/profile.c b/reactos/ntoskrnl/ex/profile.c index a0026e151b3..49926df165a 100644 --- a/reactos/ntoskrnl/ex/profile.c +++ b/reactos/ntoskrnl/ex/profile.c @@ -13,6 +13,10 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeProfileImplementation) +#endif + /* FIXME: NDK This structure is a *GUESS* -- Alex */ typedef struct _EPROFILE { PEPROCESS Process; diff --git a/reactos/ntoskrnl/ex/sem.c b/reactos/ntoskrnl/ex/sem.c index 427f4d57051..62a5523d086 100644 --- a/reactos/ntoskrnl/ex/sem.c +++ b/reactos/ntoskrnl/ex/sem.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeSemaphoreImplementation() +#endif + /* GLOBALS ******************************************************************/ POBJECT_TYPE ExSemaphoreObjectType; diff --git a/reactos/ntoskrnl/ex/time.c b/reactos/ntoskrnl/ex/time.c index 8d57146624f..f2844b1c912 100644 --- a/reactos/ntoskrnl/ex/time.c +++ b/reactos/ntoskrnl/ex/time.c @@ -17,6 +17,10 @@ #define TICKSPERMINUTE 600000000 +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitTimeZoneInfo) +#endif + /* GLOBALS ******************************************************************/ /* Note: Bias[minutes] = UTC - local time */ diff --git a/reactos/ntoskrnl/ex/timer.c b/reactos/ntoskrnl/ex/timer.c index d89cc50f8df..d8ba7e03c8b 100644 --- a/reactos/ntoskrnl/ex/timer.c +++ b/reactos/ntoskrnl/ex/timer.c @@ -14,6 +14,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeTimerImplementation) +#endif + + /* TYPES ********************************************************************/ /* Executive Timer Object */ diff --git a/reactos/ntoskrnl/ex/uuid.c b/reactos/ntoskrnl/ex/uuid.c index 8abcd26b6a6..4e96cdf8ae1 100644 --- a/reactos/ntoskrnl/ex/uuid.c +++ b/reactos/ntoskrnl/ex/uuid.c @@ -26,6 +26,10 @@ #define SECS_15_OCT_1582_TO_1601 ((17 + 30 + 31 + 365 * 18 + 5) * SECSPERDAY) #define TICKS_15_OCT_1582_TO_1601 ((ULONGLONG)SECS_15_OCT_1582_TO_1601 * TICKSPERSEC) +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitUuids) +#endif + /* GLOBALS ****************************************************************/ diff --git a/reactos/ntoskrnl/ex/win32k.c b/reactos/ntoskrnl/ex/win32k.c index 96605d9b35b..c29c370c781 100644 --- a/reactos/ntoskrnl/ex/win32k.c +++ b/reactos/ntoskrnl/ex/win32k.c @@ -13,6 +13,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpWin32kInit) +#endif + /* DATA **********************************************************************/ POBJECT_TYPE ExWindowStationObjectType = NULL; diff --git a/reactos/ntoskrnl/ex/work.c b/reactos/ntoskrnl/ex/work.c index 50016895e57..5283bcf3220 100644 --- a/reactos/ntoskrnl/ex/work.c +++ b/reactos/ntoskrnl/ex/work.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ExpInitializeWorkerThreads) +#endif + /* DEFINES *******************************************************************/ #define NUMBER_OF_WORKER_THREADS (5) diff --git a/reactos/ntoskrnl/fs/filelock.c b/reactos/ntoskrnl/fs/filelock.c index a37f5e2f96f..5889e1a18b1 100644 --- a/reactos/ntoskrnl/fs/filelock.c +++ b/reactos/ntoskrnl/fs/filelock.c @@ -12,6 +12,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, FsRtlpInitFileLockingImplementation) +#endif + + /* NOTE: I'm not using resource syncronization here, since FsRtlFastCheckLockForRead/Write diff --git a/reactos/ntoskrnl/fs/notify.c b/reactos/ntoskrnl/fs/notify.c index 526f4ad9e89..05cbc2702da 100644 --- a/reactos/ntoskrnl/fs/notify.c +++ b/reactos/ntoskrnl/fs/notify.c @@ -13,6 +13,10 @@ //#define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, FsRtlpInitNotifyImplementation) +#endif + PAGED_LOOKASIDE_LIST NotifyEntryLookaside; @@ -61,7 +65,7 @@ FsRtlpInitNotifyImplementation(VOID) static -inline +__inline BOOLEAN FsRtlpIsUnicodePath( PSTRING Path @@ -593,7 +597,7 @@ FsRtlpGetNextIrp(PNOTIFY_ENTRY NotifyEntry) static -inline +__inline VOID FsRtlpCopyName( PFILE_NOTIFY_INFORMATION CurrentEntry, diff --git a/reactos/ntoskrnl/fs/util.c b/reactos/ntoskrnl/fs/util.c index 3eaa7ca7718..cdde522cb34 100644 --- a/reactos/ntoskrnl/fs/util.c +++ b/reactos/ntoskrnl/fs/util.c @@ -21,9 +21,14 @@ /* GLOBALS *******************************************************************/ BOOLEAN STDCALL MmIsFileAPagingFile(PFILE_OBJECT FileObject); +VOID STDCALL INIT_FUNCTION RtlpInitializeResources(VOID); static ULONG FsRtlpAllocatedResources = 0; static PERESOURCE FsRtlpResources; +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, RtlpInitializeResources) +#endif + /* PRIVATE FUNCTIONS**********************************************************/ VOID diff --git a/reactos/ntoskrnl/inbv/inbv.c b/reactos/ntoskrnl/inbv/inbv.c index b42e5a30496..a3e3145cc76 100755 --- a/reactos/ntoskrnl/inbv/inbv.c +++ b/reactos/ntoskrnl/inbv/inbv.c @@ -15,6 +15,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, InbvEnableBootDriver) +#endif + /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/io/arcname.c b/reactos/ntoskrnl/io/arcname.c index 029c58a7f44..409e1135ec4 100644 --- a/reactos/ntoskrnl/io/arcname.c +++ b/reactos/ntoskrnl/io/arcname.c @@ -15,6 +15,38 @@ #define NDEBUG #include +static NTSTATUS +STDCALL INIT_FUNCTION +DiskQueryRoutine(PWSTR ValueName, + ULONG ValueType, + PVOID ValueData, + ULONG ValueLength, + PVOID Context, + PVOID EntryContext); + +static VOID INIT_FUNCTION +IopEnumerateBiosDisks(PLIST_ENTRY ListHead); + +static VOID INIT_FUNCTION +IopEnumerateDisks(PLIST_ENTRY ListHead); + +static NTSTATUS INIT_FUNCTION +IopAssignArcNamesToDisk(PDEVICE_OBJECT DeviceObject, ULONG RDisk, ULONG DiskNumber); + +static NTSTATUS INIT_FUNCTION +IopCheckCdromDevices(PULONG DeviceNumber); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, DiskQueryRoutine) +#pragma alloc_text(INIT, IopEnumerateBiosDisks) +#pragma alloc_text(INIT, IopEnumerateDisks) +#pragma alloc_text(INIT, IopAssignArcNamesToDisk) +#pragma alloc_text(INIT, IoCreateArcNames) +#pragma alloc_text(INIT, IopCheckCdromDevices) +#pragma alloc_text(INIT, IoCreateSystemRootLink) +#endif + + /* MACROS *******************************************************************/ #define FS_VOLUME_BUFFER_SIZE (MAX_PATH + sizeof(FILE_FS_VOLUME_INFORMATION)) diff --git a/reactos/ntoskrnl/io/bootlog.c b/reactos/ntoskrnl/io/bootlog.c index 421e568042a..010d61ce7ff 100644 --- a/reactos/ntoskrnl/io/bootlog.c +++ b/reactos/ntoskrnl/io/bootlog.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IopInitBootLog) +#pragma alloc_text(INIT, IopStartBootLog() +#endif /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/io/driver.c b/reactos/ntoskrnl/io/driver.c index 888352e35a2..3684ac83713 100644 --- a/reactos/ntoskrnl/io/driver.c +++ b/reactos/ntoskrnl/io/driver.c @@ -19,11 +19,6 @@ extern LOADER_PARAMETER_BLOCK KeLoaderBlock; extern ULONG KeTickCount; extern BOOLEAN SetupMode; -NTSTATUS -LdrProcessModule(PVOID ModuleLoadBase, - PUNICODE_STRING ModuleName, - PLDR_DATA_TABLE_ENTRY *ModuleObject); - typedef struct _SERVICE_GROUP { LIST_ENTRY GroupListEntry; @@ -80,6 +75,41 @@ POBJECT_TYPE IoDriverObjectType = NULL; VOID STDCALL IopDeleteDriver(PVOID ObjectBody); +NTSTATUS +LdrProcessModule(PVOID ModuleLoadBase, + PUNICODE_STRING ModuleName, + PLDR_DATA_TABLE_ENTRY *ModuleObject); + +VOID +FASTCALL +INIT_FUNCTION +IopDisplayLoadingMessage(PVOID ServiceName, + BOOLEAN Unicode); + +static VOID INIT_FUNCTION +MiFreeBootDriverMemory(PVOID StartAddress, ULONG Length); + +NTSTATUS FASTCALL INIT_FUNCTION +IopInitializeBuiltinDriver( + PDEVICE_NODE ModuleDeviceNode, + PVOID ModuleLoadBase, + PCHAR FileName, + ULONG ModuleLength); + +static INIT_FUNCTION NTSTATUS +IopLoadDriver(PSERVICE Service); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IopInitDriverImplementation) +#pragma alloc_text(INIT, IopDisplayLoadingMessage) +#pragma alloc_text(INIT, IoCreateDriverList) +#pragma alloc_text(INIT, IoDestroyDriverList) +#pragma alloc_text(INIT, MiFreeBootDriverMemory) +#pragma alloc_text(INIT, IopInitializeBuiltinDriver) +#pragma alloc_text(INIT, IopLoadDriver) +#endif + + /* PRIVATE FUNCTIONS **********************************************************/ VOID @@ -1153,7 +1183,7 @@ IoDestroyDriverList(VOID) return(STATUS_SUCCESS); } -VOID STATIC INIT_FUNCTION +static VOID INIT_FUNCTION MiFreeBootDriverMemory(PVOID StartAddress, ULONG Length) { ULONG i; diff --git a/reactos/ntoskrnl/io/fs.c b/reactos/ntoskrnl/io/fs.c index 935f2fc7943..3fd7b8822c2 100644 --- a/reactos/ntoskrnl/io/fs.c +++ b/reactos/ntoskrnl/io/fs.c @@ -14,6 +14,9 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IoInitFileSystemImplementation) +#endif /* TYPES *******************************************************************/ diff --git a/reactos/ntoskrnl/io/iomgr.c b/reactos/ntoskrnl/io/iomgr.c index dd5c5a13e22..7845d08e19c 100644 --- a/reactos/ntoskrnl/io/iomgr.c +++ b/reactos/ntoskrnl/io/iomgr.c @@ -40,6 +40,18 @@ extern POBJECT_TYPE IoAdapterObjectType; NPAGED_LOOKASIDE_LIST IoLargeIrpLookaside; NPAGED_LOOKASIDE_LIST IoSmallIrpLookaside; +VOID INIT_FUNCTION IopInitLookasideLists(VOID); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IoInitCancelHandling) +#pragma alloc_text(INIT, IoInitShutdownNotification) +#pragma alloc_text(INIT, IopInitLookasideLists) +#pragma alloc_text(INIT, IoInit) +#pragma alloc_text(INIT, IoInit2) +#pragma alloc_text(INIT, IoInit3) +#endif + + /* INIT FUNCTIONS ************************************************************/ VOID diff --git a/reactos/ntoskrnl/io/plugplay.c b/reactos/ntoskrnl/io/plugplay.c index 6ea0e36bf32..6957bae2157 100644 --- a/reactos/ntoskrnl/io/plugplay.c +++ b/reactos/ntoskrnl/io/plugplay.c @@ -14,6 +14,9 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IopInitPlugPlayEvents) +#endif typedef struct _PNP_EVENT_ENTRY { diff --git a/reactos/ntoskrnl/io/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr.c index 064eb7f83c4..b2785ce6c50 100644 --- a/reactos/ntoskrnl/io/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr.c @@ -97,6 +97,15 @@ ULONG crc32Table[256] = 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D, }; +static NTSTATUS INIT_FUNCTION +IopSetRootDeviceInstanceData(PDEVICE_NODE DeviceNode); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IopSetRootDeviceInstanceData) +#pragma alloc_text(INIT, PnpInit) +#pragma alloc_text(INIT, PnpInit2) +#endif + /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/io/pnpnotify.c b/reactos/ntoskrnl/io/pnpnotify.c index bf8deb6569a..5c5e39fac36 100644 --- a/reactos/ntoskrnl/io/pnpnotify.c +++ b/reactos/ntoskrnl/io/pnpnotify.c @@ -15,6 +15,11 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IopInitPnpNotificationImplementation) +#endif + + /* TYPES *******************************************************************/ typedef struct _PNP_NOTIFY_ENTRY diff --git a/reactos/ntoskrnl/io/vpb.c b/reactos/ntoskrnl/io/vpb.c index f7d07220237..c36004853a2 100644 --- a/reactos/ntoskrnl/io/vpb.c +++ b/reactos/ntoskrnl/io/vpb.c @@ -14,6 +14,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, IoInitVpbImplementation) +#endif + + /* GLOBALS *******************************************************************/ static KSPIN_LOCK IoVpbLock; diff --git a/reactos/ntoskrnl/kd/kdinit.c b/reactos/ntoskrnl/kd/kdinit.c index 55297c3d50f..4e5aa0a33c7 100644 --- a/reactos/ntoskrnl/kd/kdinit.c +++ b/reactos/ntoskrnl/kd/kdinit.c @@ -11,6 +11,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, KdInitSystem) +#endif + + /* Make bochs debug output in the very early boot phase available */ //#define AUTO_ENABLE_BOCHS diff --git a/reactos/ntoskrnl/ke/bug.c b/reactos/ntoskrnl/ke/bug.c index 97a8456cba5..ee55dfd1d65 100644 --- a/reactos/ntoskrnl/ke/bug.c +++ b/reactos/ntoskrnl/ke/bug.c @@ -15,6 +15,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, KiInitializeBugCheck) +#endif + /* GLOBALS ******************************************************************/ static LIST_ENTRY BugcheckCallbackListHead = {NULL,NULL}; diff --git a/reactos/ntoskrnl/ke/clock.c b/reactos/ntoskrnl/ke/clock.c index bcb80cf32b6..8bfc70772a5 100644 --- a/reactos/ntoskrnl/ke/clock.c +++ b/reactos/ntoskrnl/ke/clock.c @@ -20,6 +20,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, KiInitializeSystemClock) +#endif + /* GLOBALS ****************************************************************/ /* diff --git a/reactos/ntoskrnl/ke/device.c b/reactos/ntoskrnl/ke/device.c index 07c1b0ef78a..98d0cf424bd 100644 --- a/reactos/ntoskrnl/ke/device.c +++ b/reactos/ntoskrnl/ke/device.c @@ -11,6 +11,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, KeFindConfigurationEntry) +#pragma alloc_text(INIT, KeFindConfigurationNextEntry) +#endif + /* * @implemented */ diff --git a/reactos/ntoskrnl/ke/dpc.c b/reactos/ntoskrnl/ke/dpc.c index 319c78a55fb..2ddf8e50a03 100644 --- a/reactos/ntoskrnl/ke/dpc.c +++ b/reactos/ntoskrnl/ke/dpc.c @@ -21,6 +21,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, KeInitDpc) +#endif + + /* TYPES *******************************************************************/ #define MAX_QUANTUM 0x7F diff --git a/reactos/ntoskrnl/ke/i386/exp.c b/reactos/ntoskrnl/ke/i386/exp.c index a5275b61dbb..0f313b8f6b8 100644 --- a/reactos/ntoskrnl/ke/i386/exp.c +++ b/reactos/ntoskrnl/ke/i386/exp.c @@ -15,6 +15,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, KeInitExceptions) +#endif + + /* * FIXMES: * - Put back VEH. diff --git a/reactos/ntoskrnl/ke/i386/kernel.c b/reactos/ntoskrnl/ke/i386/kernel.c index ad83bfd694e..cf65530648a 100644 --- a/reactos/ntoskrnl/ke/i386/kernel.c +++ b/reactos/ntoskrnl/ke/i386/kernel.c @@ -29,9 +29,20 @@ ULONG KiFastSystemCallDisable = 1; extern PVOID Ki386InitialStackArray[MAXIMUM_PROCESSORS]; extern ULONG IdleProcessorMask; +static VOID INIT_FUNCTION Ki386GetCpuId(VOID); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, Ki386GetCpuId) +#pragma alloc_text(INIT, KeCreateApplicationProcessorIdleThread) +#pragma alloc_text(INIT, KePrepareForApplicationProcessorInit) +#pragma alloc_text(INIT, KeInit1) +#pragma alloc_text(INIT, KeInit2) +#pragma alloc_text(INIT, Ki386SetProcessorFeatures) +#endif + /* FUNCTIONS *****************************************************************/ -VOID INIT_FUNCTION STATIC +static VOID INIT_FUNCTION Ki386GetCpuId(VOID) { ULONG OrigFlags, Flags, FinalFlags; diff --git a/reactos/ntoskrnl/ke/i386/tss.c b/reactos/ntoskrnl/ke/i386/tss.c index cf37e9c9480..abfcd474645 100644 --- a/reactos/ntoskrnl/ke/i386/tss.c +++ b/reactos/ntoskrnl/ke/i386/tss.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, Ki386BootInitializeTSS) +#endif + /* GLOBALS *******************************************************************/ typedef struct _KTSSNOIOPM diff --git a/reactos/ntoskrnl/ke/i386/vdm.c b/reactos/ntoskrnl/ke/i386/vdm.c index cca19c957ea..d7addfbecca 100644 --- a/reactos/ntoskrnl/ke/i386/vdm.c +++ b/reactos/ntoskrnl/ke/i386/vdm.c @@ -13,6 +13,11 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, NtEarlyInitVdm) +#endif + + /* GLOBALS *******************************************************************/ static UCHAR OrigIVT[1024]; diff --git a/reactos/ntoskrnl/ke/main.c b/reactos/ntoskrnl/ke/main.c index 6e9a055c8e0..f8b31164328 100644 --- a/reactos/ntoskrnl/ke/main.c +++ b/reactos/ntoskrnl/ke/main.c @@ -64,6 +64,12 @@ PLOADER_MODULE CachedModules[MaximumCachedModuleType]; extern unsigned int _image_base__; ULONG_PTR KERNEL_BASE = (ULONG_PTR)&_image_base__; +VOID INIT_FUNCTION _main(ULONG MultiBootMagic, PLOADER_PARAMETER_BLOCK _LoaderBlock); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, _main) +#endif + /* FUNCTIONS ****************************************************************/ /* diff --git a/reactos/ntoskrnl/ke/usercall.c b/reactos/ntoskrnl/ke/usercall.c index f5185cf3bf8..ac647863db7 100644 --- a/reactos/ntoskrnl/ke/usercall.c +++ b/reactos/ntoskrnl/ke/usercall.c @@ -13,6 +13,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, PsInitialiseW32Call) +#endif + /* FUNCTIONS *****************************************************************/ #if ALEX_CB_REWRITE diff --git a/reactos/ntoskrnl/ldr/loader.c b/reactos/ntoskrnl/ldr/loader.c index 07fd9b7eb06..8866fdafdf7 100644 --- a/reactos/ntoskrnl/ldr/loader.c +++ b/reactos/ntoskrnl/ldr/loader.c @@ -34,6 +34,12 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, LdrInit1) +#pragma alloc_text(INIT, LdrInitModuleManagement) +#pragma alloc_text(INIT, LdrSafePEProcessModule) +#endif + /* GLOBALS *******************************************************************/ LIST_ENTRY ModuleListHead; diff --git a/reactos/ntoskrnl/lpc/port.c b/reactos/ntoskrnl/lpc/port.c index 7a0a4350fa0..fec68bbb8d9 100644 --- a/reactos/ntoskrnl/lpc/port.c +++ b/reactos/ntoskrnl/lpc/port.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, LpcpInitSystem) +#endif + /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/mm/aspace.c b/reactos/ntoskrnl/mm/aspace.c index b79d67b02d4..72186c3ebc1 100644 --- a/reactos/ntoskrnl/mm/aspace.c +++ b/reactos/ntoskrnl/mm/aspace.c @@ -13,6 +13,11 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitializeKernelAddressSpace) +#endif + + /* GLOBALS ******************************************************************/ STATIC MADDRESS_SPACE KernelAddressSpace; diff --git a/reactos/ntoskrnl/mm/balance.c b/reactos/ntoskrnl/mm/balance.c index 7bde7660138..b460946fc41 100644 --- a/reactos/ntoskrnl/mm/balance.c +++ b/reactos/ntoskrnl/mm/balance.c @@ -14,6 +14,13 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitializeBalancer) +#pragma alloc_text(INIT, MmInitializeMemoryConsumer) +#pragma alloc_text(INIT, MiInitBalancerThread) +#endif + + /* TYPES ********************************************************************/ typedef struct _MM_ALLOCATION_REQUEST { diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 2dc9138e440..522926fb0c0 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -15,6 +15,12 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitializePageList) +#pragma alloc_text(INIT, MmInitZeroPageThread) +#endif + + /* TYPES *******************************************************************/ #define MM_PHYSICAL_PAGE_FREE (0x1) diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index c2f7ccb7410..25f5032403f 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -14,6 +14,12 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitGlobalKernelPageDirectory) +#pragma alloc_text(INIT, MiInitPageDirectoryMap) +#endif + + /* GLOBALS *****************************************************************/ #define PA_BIT_PRESENT (0) diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index d4d758b1f0a..2a41d1a0ce0 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -47,6 +47,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitMemoryAreas) +#endif + /* #define VALIDATE_MEMORY_AREAS */ /* FUNCTIONS *****************************************************************/ diff --git a/reactos/ntoskrnl/mm/mdl.c b/reactos/ntoskrnl/mm/mdl.c index 713952e1d6d..558de995277 100644 --- a/reactos/ntoskrnl/mm/mdl.c +++ b/reactos/ntoskrnl/mm/mdl.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitializeMdlImplementation) +#endif + /* GLOBALS *******************************************************************/ #define TAG_MDL TAG('M', 'D', 'L', ' ') diff --git a/reactos/ntoskrnl/mm/mminit.c b/reactos/ntoskrnl/mm/mminit.c index 72920154aa2..ff2a54b2b90 100644 --- a/reactos/ntoskrnl/mm/mminit.c +++ b/reactos/ntoskrnl/mm/mminit.c @@ -39,6 +39,15 @@ ULONG MiNonPagedPoolLength; extern ULONG init_stack; extern ULONG init_stack_top; +VOID INIT_FUNCTION NTAPI MmInitVirtualMemory(ULONG_PTR LastKernelAddress, ULONG KernelLength); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitVirtualMemory) +#pragma alloc_text(INIT, MmInit1) +#pragma alloc_text(INIT, MmInit2) +#pragma alloc_text(INIT, MmInit3) +#endif + /* FUNCTIONS ****************************************************************/ /* diff --git a/reactos/ntoskrnl/mm/npool.c b/reactos/ntoskrnl/mm/npool.c index e032be4e323..0de653fa6cf 100644 --- a/reactos/ntoskrnl/mm/npool.c +++ b/reactos/ntoskrnl/mm/npool.c @@ -17,6 +17,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MiInitializeNonPagedPool) +#endif + #ifdef ENABLE_VALIDATE_POOL #define VALIDATE_POOL validate_kernel_pool() #else diff --git a/reactos/ntoskrnl/mm/pagefile.c b/reactos/ntoskrnl/mm/pagefile.c index 44d5b950e8d..1303c0016de 100644 --- a/reactos/ntoskrnl/mm/pagefile.c +++ b/reactos/ntoskrnl/mm/pagefile.c @@ -32,6 +32,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitPagingFile) +#endif + + /* TYPES *********************************************************************/ typedef struct _PAGINGFILE diff --git a/reactos/ntoskrnl/mm/pageop.c b/reactos/ntoskrnl/mm/pageop.c index 12944b18cdc..2964c6eb77d 100644 --- a/reactos/ntoskrnl/mm/pageop.c +++ b/reactos/ntoskrnl/mm/pageop.c @@ -14,6 +14,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitializePageOp) +#endif + + /* GLOBALS *******************************************************************/ #define PAGEOP_HASH_TABLE_SIZE (32) diff --git a/reactos/ntoskrnl/mm/ppool.c b/reactos/ntoskrnl/mm/ppool.c index 816d30bc5b0..ae73ba8b9c3 100644 --- a/reactos/ntoskrnl/mm/ppool.c +++ b/reactos/ntoskrnl/mm/ppool.c @@ -19,6 +19,10 @@ #include #endif//PPOOL_UMODE_TEST +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitializePagedPool) +#endif + #undef ASSERT #define ASSERT(x) if (!(x)) {DbgPrint("Assertion "#x" failed at %s:%d\n", __FILE__,__LINE__); KeBugCheck(0); } diff --git a/reactos/ntoskrnl/mm/process.c b/reactos/ntoskrnl/mm/process.c index 2f1baed1a45..3ce0029dcc3 100644 --- a/reactos/ntoskrnl/mm/process.c +++ b/reactos/ntoskrnl/mm/process.c @@ -206,7 +206,7 @@ MmCreatePeb(PEPROCESS Process) /* Allocate the PEB */ Peb = MiCreatePebOrTeb(Process, (PVOID)((ULONG_PTR)MM_HIGHEST_VAD_ADDRESS + 1)); - ASSERT(Peb == (PVOID)0x7FFDF000) + ASSERT(Peb == (PVOID)0x7FFDF000); /* Map NLS Tables */ DPRINT("Mapping NLS\n"); diff --git a/reactos/ntoskrnl/mm/rmap.c b/reactos/ntoskrnl/mm/rmap.c index 6bc9ffea066..2c3e16002d5 100644 --- a/reactos/ntoskrnl/mm/rmap.c +++ b/reactos/ntoskrnl/mm/rmap.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmInitializeRmapList) +#endif + /* TYPES ********************************************************************/ typedef struct _MM_RMAP_ENTRY diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 15b089d6903..db2b7037863 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -49,9 +49,14 @@ #include #define NDEBUG #include - #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, MmCreatePhysicalMemorySection) +#pragma alloc_text(INIT, MmInitSectionImplementation) +#endif + + /* TYPES *********************************************************************/ typedef struct diff --git a/reactos/ntoskrnl/ob/namespc.c b/reactos/ntoskrnl/ob/namespc.c index 0add8fa48a5..debaeb8b88d 100644 --- a/reactos/ntoskrnl/ob/namespc.c +++ b/reactos/ntoskrnl/ob/namespc.c @@ -14,6 +14,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ObInit) +#endif + + extern ULONG NtGlobalFlag; /* GLOBALS ****************************************************************/ diff --git a/reactos/ntoskrnl/ob/symlink.c b/reactos/ntoskrnl/ob/symlink.c index 371cc9b1039..d9cb8afb90d 100644 --- a/reactos/ntoskrnl/ob/symlink.c +++ b/reactos/ntoskrnl/ob/symlink.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, ObInitSymbolicLinkImplementation) +#endif + /* GLOBALS ******************************************************************/ diff --git a/reactos/ntoskrnl/po/power.c b/reactos/ntoskrnl/po/power.c index 51aae8677b1..d3f83223ab9 100644 --- a/reactos/ntoskrnl/po/power.c +++ b/reactos/ntoskrnl/po/power.c @@ -13,6 +13,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, PoInit) +#endif + + typedef struct _REQUEST_POWER_ITEM { PREQUEST_POWER_COMPLETE CompletionRoutine; diff --git a/reactos/ntoskrnl/ps/idle.c b/reactos/ntoskrnl/ps/idle.c index 545d4e1d74d..bdaa45e7a92 100644 --- a/reactos/ntoskrnl/ps/idle.c +++ b/reactos/ntoskrnl/ps/idle.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, PsInitIdleThread) +#endif + /* GLOBALS *******************************************************************/ extern PEPROCESS PsIdleProcess; diff --git a/reactos/ntoskrnl/ps/job.c b/reactos/ntoskrnl/ps/job.c index d54eea12e60..e32be74906e 100644 --- a/reactos/ntoskrnl/ps/job.c +++ b/reactos/ntoskrnl/ps/job.c @@ -16,6 +16,12 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, PsInitJobManagment) +#endif + + + /* GLOBALS *******************************************************************/ POBJECT_TYPE PsJobType = NULL; diff --git a/reactos/ntoskrnl/ps/locale.c b/reactos/ntoskrnl/ps/locale.c index 3fc6f493ed5..50ae019509b 100644 --- a/reactos/ntoskrnl/ps/locale.c +++ b/reactos/ntoskrnl/ps/locale.c @@ -15,6 +15,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, PiInitDefaultLocale) +#endif + /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 1a5c1297116..b2d6e61c7c0 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -193,9 +193,10 @@ PspCreateProcess(OUT PHANDLE ProcessHandle, PHYSICAL_ADDRESS DirectoryTableBase; KAFFINITY Affinity; HANDLE_TABLE_ENTRY CidEntry; - DirectoryTableBase.QuadPart = (ULONGLONG)0; BOOLEAN ProcessCreated = FALSE; + DirectoryTableBase.QuadPart = (ULONGLONG)0; + DPRINT("PspCreateProcess(ObjectAttributes %x)\n", ObjectAttributes); /* Reference the Parent if there is one */ diff --git a/reactos/ntoskrnl/ps/psmgr.c b/reactos/ntoskrnl/ps/psmgr.c index 76172772477..a9382b09a97 100644 --- a/reactos/ntoskrnl/ps/psmgr.c +++ b/reactos/ntoskrnl/ps/psmgr.c @@ -46,6 +46,17 @@ PVOID PspSystemDllSection = NULL; PVOID PspSystemDllEntryPoint = NULL; PHANDLE_TABLE PspCidTable = NULL; VOID STDCALL PspKillMostProcesses(); +VOID INIT_FUNCTION NTAPI PsInitClientIDManagment(VOID); +NTSTATUS STDCALL INIT_FUNCTION PspLookupKernelUserEntryPoints(VOID); + +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, PiInitProcessManager) +#pragma alloc_text(INIT, PsInitClientIDManagment) +#pragma alloc_text(INIT, PsInitThreadManagment) +#pragma alloc_text(INIT, PsInitProcessManagment) +#pragma alloc_text(INIT, PspLookupKernelUserEntryPoints) +#pragma alloc_text(INIT, PsLocateSystemDll) +#endif /* FUNCTIONS ***************************************************************/ diff --git a/reactos/ntoskrnl/rtl/nls.c b/reactos/ntoskrnl/rtl/nls.c index 6dc536af17d..15c63a50d4c 100644 --- a/reactos/ntoskrnl/rtl/nls.c +++ b/reactos/ntoskrnl/rtl/nls.c @@ -11,6 +11,15 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, RtlpInitNls) +#pragma alloc_text(INIT, RtlpImportAnsiCodePage) +#pragma alloc_text(INIT, RtlpImportOemCodePage) +#pragma alloc_text(INIT, RtlpImportUnicodeCasemap) +#pragma alloc_text(INIT, RtlpCreateInitialNlsTables) +#pragma alloc_text(INIT, RtlpCreateNlsSection) +#endif + /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/se/acl.c b/reactos/ntoskrnl/se/acl.c index de9118301f5..2ed35412892 100644 --- a/reactos/ntoskrnl/se/acl.c +++ b/reactos/ntoskrnl/se/acl.c @@ -13,6 +13,11 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, SepInitDACLs) +#endif + + /* GLOBALS ******************************************************************/ PACL SePublicDefaultDacl = NULL; diff --git a/reactos/ntoskrnl/se/luid.c b/reactos/ntoskrnl/se/luid.c index 948264677f1..95239c9be24 100644 --- a/reactos/ntoskrnl/se/luid.c +++ b/reactos/ntoskrnl/se/luid.c @@ -13,6 +13,11 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, SepInitLuid) +#endif + + /* GLOBALS *******************************************************************/ static LARGE_INTEGER LuidIncrement; diff --git a/reactos/ntoskrnl/se/priv.c b/reactos/ntoskrnl/se/priv.c index 75472313307..4cb4eca32a1 100644 --- a/reactos/ntoskrnl/se/priv.c +++ b/reactos/ntoskrnl/se/priv.c @@ -14,6 +14,10 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, SepInitPrivileges) +#endif + /* GLOBALS *******************************************************************/ diff --git a/reactos/ntoskrnl/se/sd.c b/reactos/ntoskrnl/se/sd.c index 18accd337f8..651defd68d3 100644 --- a/reactos/ntoskrnl/se/sd.c +++ b/reactos/ntoskrnl/se/sd.c @@ -13,6 +13,11 @@ #include #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, SepInitSDs) +#endif + + /* GLOBALS ******************************************************************/ PSECURITY_DESCRIPTOR SePublicDefaultSd = NULL; diff --git a/reactos/ntoskrnl/se/semgr.c b/reactos/ntoskrnl/se/semgr.c index be0bd6576f6..7b10faed562 100644 --- a/reactos/ntoskrnl/se/semgr.c +++ b/reactos/ntoskrnl/se/semgr.c @@ -26,6 +26,11 @@ static ERESOURCE SepSubjectContextLock; static BOOLEAN SepInitExports(VOID); +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, SeInit1) +#pragma alloc_text(INIT, SeInit2) +#pragma alloc_text(INIT, SepInitExports) +#endif /* FUNCTIONS ****************************************************************/ diff --git a/reactos/ntoskrnl/se/sid.c b/reactos/ntoskrnl/se/sid.c index 38e4b867448..ec506a75443 100644 --- a/reactos/ntoskrnl/se/sid.c +++ b/reactos/ntoskrnl/se/sid.c @@ -15,6 +15,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, SepInitSecurityIDs) +#endif + + /* GLOBALS ******************************************************************/ SID_IDENTIFIER_AUTHORITY SeNullSidAuthority = {SECURITY_NULL_SID_AUTHORITY}; diff --git a/reactos/ntoskrnl/se/token.c b/reactos/ntoskrnl/se/token.c index 009fa985294..2c71c0b5359 100644 --- a/reactos/ntoskrnl/se/token.c +++ b/reactos/ntoskrnl/se/token.c @@ -15,6 +15,11 @@ #define NDEBUG #include +#if defined (ALLOC_PRAGMA) +#pragma alloc_text(INIT, SepInitializeTokenImplementation) +#endif + + /* GLOBALS *******************************************************************/ POBJECT_TYPE SepTokenObjectType = NULL;