mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 00:41:36 +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
|
@ -16,9 +16,9 @@
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
|
//INIT_FUNCTION
|
||||||
PSECURITY_DESCRIPTOR
|
PSECURITY_DESCRIPTOR
|
||||||
NTAPI
|
NTAPI
|
||||||
INIT_FUNCTION
|
|
||||||
CmpHiveRootSecurityDescriptor(VOID)
|
CmpHiveRootSecurityDescriptor(VOID)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
|
@ -47,7 +47,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
INIT_FUNCTION
|
|
||||||
NTAPI
|
NTAPI
|
||||||
DbgkInitialize(
|
DbgkInitialize(
|
||||||
VOID
|
VOID
|
||||||
|
|
|
@ -662,7 +662,6 @@ IoDestroyDriverList(
|
||||||
);
|
);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
INIT_FUNCTION
|
|
||||||
IopInitPlugPlayEvents(VOID);
|
IopInitPlugPlayEvents(VOID);
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
|
|
|
@ -3,17 +3,16 @@
|
||||||
/*
|
/*
|
||||||
* Use these to place a function in a specific section of the executable
|
* Use these to place a function in a specific section of the executable
|
||||||
*/
|
*/
|
||||||
#define PLACE_IN_SECTION(s) __attribute__((section (s)))
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define INIT_FUNCTION
|
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||||
#define PAGE_LOCKED_FUNCTION PLACE_IN_SECTION("pagelk")
|
#define INIT_FUNCTION INIT_SECTION
|
||||||
#define PAGE_UNLOCKED_FUNCTION PLACE_IN_SECTION("pagepo")
|
|
||||||
#else
|
#else
|
||||||
#define INIT_FUNCTION
|
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||||
#define PAGE_LOCKED_FUNCTION
|
#define INIT_FUNCTION INIT_SECTION
|
||||||
#define PAGE_UNLOCKED_FUNCTION
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef _NTOSKRNL_
|
#ifdef _NTOSKRNL_
|
||||||
|
|
||||||
#ifndef _ARM_
|
#ifndef _ARM_
|
||||||
|
|
|
@ -197,7 +197,6 @@ IopSuffixUnicodeString(
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
INIT_FUNCTION
|
|
||||||
IopDisplayLoadingMessage(PUNICODE_STRING ServiceName)
|
IopDisplayLoadingMessage(PUNICODE_STRING ServiceName)
|
||||||
{
|
{
|
||||||
CHAR TextBuffer[256];
|
CHAR TextBuffer[256];
|
||||||
|
|
|
@ -242,7 +242,6 @@ PspLookupKernelUserEntryPoints(VOID)
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
INIT_FUNCTION
|
|
||||||
PspMapSystemDll(IN PEPROCESS Process,
|
PspMapSystemDll(IN PEPROCESS Process,
|
||||||
IN PVOID *DllBase,
|
IN PVOID *DllBase,
|
||||||
IN BOOLEAN UseLargePages)
|
IN BOOLEAN UseLargePages)
|
||||||
|
|
|
@ -10,15 +10,12 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if 0
|
#ifdef __GNUC__
|
||||||
#ifndef _MSC_VER
|
#define INIT_SECTION __attribute__((section ("INIT")))
|
||||||
#define PLACE_IN_SECTION(s) __attribute__((section(s)))
|
#define INIT_FUNCTION INIT_SECTION
|
||||||
#define INIT_FUNCTION PLACE_IN_SECTION("INIT")
|
|
||||||
#else
|
#else
|
||||||
#define INIT_FUNCTION
|
#define INIT_SECTION /* Done via alloc_text for MSC */
|
||||||
#endif
|
#define INIT_FUNCTION INIT_SECTION
|
||||||
#else
|
|
||||||
#define INIT_FUNCTION
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Enable debugging features */
|
/* Enable debugging features */
|
||||||
|
|
Loading…
Reference in a new issue