mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
- Enable placing kernel functions in the .INIT section (GCC only, MSVC is TBD). This allows them to be freed from memory after initialization is finished.
- PspMapSystemDll and IopDisplayLoadingMessage are called from non-initialization code, so don't put them in .INIT. CmpHiveRootSecurityDescriptor is called from initialization code, but too late in boot, so don't discard it either. - Trying to enable this for HAL as well leads to a weird crash very early in boot. Investigation is ongoing. Until then we will just have to keep the huge PCI Class/Vendor tables in memory... - Enable it for Win32k though as it seems to work fine there. - Remove INIT_FUNCTION from function prototypes, it serves no purpose there. See issue 10097 for more details. svn path=/trunk/; revision=68937
This commit is contained in:
parent
42a15c9829
commit
72a849ff44
7 changed files with 12 additions and 20 deletions
|
@ -16,9 +16,9 @@
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
//INIT_FUNCTION
|
||||
PSECURITY_DESCRIPTOR
|
||||
NTAPI
|
||||
INIT_FUNCTION
|
||||
CmpHiveRootSecurityDescriptor(VOID)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
#endif
|
||||
|
||||
VOID
|
||||
INIT_FUNCTION
|
||||
NTAPI
|
||||
DbgkInitialize(
|
||||
VOID
|
||||
|
|
|
@ -662,7 +662,6 @@ IoDestroyDriverList(
|
|||
);
|
||||
|
||||
NTSTATUS
|
||||
INIT_FUNCTION
|
||||
IopInitPlugPlayEvents(VOID);
|
||||
|
||||
NTSTATUS
|
||||
|
|
|
@ -3,17 +3,16 @@
|
|||
/*
|
||||
* Use these to place a function in a specific section of the executable
|
||||
*/
|
||||
#define PLACE_IN_SECTION(s) __attribute__((section (s)))
|
||||
#ifdef __GNUC__
|
||||
#define INIT_FUNCTION
|
||||
#define PAGE_LOCKED_FUNCTION PLACE_IN_SECTION("pagelk")
|
||||
#define PAGE_UNLOCKED_FUNCTION PLACE_IN_SECTION("pagepo")
|
||||
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||
#define INIT_FUNCTION INIT_SECTION
|
||||
#else
|
||||
#define INIT_FUNCTION
|
||||
#define PAGE_LOCKED_FUNCTION
|
||||
#define PAGE_UNLOCKED_FUNCTION
|
||||
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||
#define INIT_FUNCTION INIT_SECTION
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef _NTOSKRNL_
|
||||
|
||||
#ifndef _ARM_
|
||||
|
|
|
@ -197,7 +197,6 @@ IopSuffixUnicodeString(
|
|||
*/
|
||||
VOID
|
||||
FASTCALL
|
||||
INIT_FUNCTION
|
||||
IopDisplayLoadingMessage(PUNICODE_STRING ServiceName)
|
||||
{
|
||||
CHAR TextBuffer[256];
|
||||
|
|
|
@ -242,7 +242,6 @@ PspLookupKernelUserEntryPoints(VOID)
|
|||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
INIT_FUNCTION
|
||||
PspMapSystemDll(IN PEPROCESS Process,
|
||||
IN PVOID *DllBase,
|
||||
IN BOOLEAN UseLargePages)
|
||||
|
|
|
@ -10,15 +10,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#if 0
|
||||
#ifndef _MSC_VER
|
||||
#define PLACE_IN_SECTION(s) __attribute__((section(s)))
|
||||
#define INIT_FUNCTION PLACE_IN_SECTION("INIT")
|
||||
#ifdef __GNUC__
|
||||
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||
#define INIT_FUNCTION INIT_SECTION
|
||||
#else
|
||||
#define INIT_FUNCTION
|
||||
#endif
|
||||
#else
|
||||
#define INIT_FUNCTION
|
||||
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||
#define INIT_FUNCTION INIT_SECTION
|
||||
#endif
|
||||
|
||||
/* Enable debugging features */
|
||||
|
|
Loading…
Reference in a new issue