diff --git a/reactos/ntoskrnl/config/cmse.c b/reactos/ntoskrnl/config/cmse.c index f92eba2cbd9..7c026f967c1 100644 --- a/reactos/ntoskrnl/config/cmse.c +++ b/reactos/ntoskrnl/config/cmse.c @@ -16,9 +16,9 @@ /* FUNCTIONS *****************************************************************/ +//INIT_FUNCTION PSECURITY_DESCRIPTOR NTAPI -INIT_FUNCTION CmpHiveRootSecurityDescriptor(VOID) { NTSTATUS Status; diff --git a/reactos/ntoskrnl/include/internal/dbgk.h b/reactos/ntoskrnl/include/internal/dbgk.h index fdab33e80af..4bc6f14750f 100644 --- a/reactos/ntoskrnl/include/internal/dbgk.h +++ b/reactos/ntoskrnl/include/internal/dbgk.h @@ -47,7 +47,6 @@ #endif VOID -INIT_FUNCTION NTAPI DbgkInitialize( VOID diff --git a/reactos/ntoskrnl/include/internal/io.h b/reactos/ntoskrnl/include/internal/io.h index 93b945bf659..6d95f7052b0 100644 --- a/reactos/ntoskrnl/include/internal/io.h +++ b/reactos/ntoskrnl/include/internal/io.h @@ -662,7 +662,6 @@ IoDestroyDriverList( ); NTSTATUS -INIT_FUNCTION IopInitPlugPlayEvents(VOID); NTSTATUS diff --git a/reactos/ntoskrnl/include/internal/ntoskrnl.h b/reactos/ntoskrnl/include/internal/ntoskrnl.h index 7d778862744..eb7b92fb8e3 100644 --- a/reactos/ntoskrnl/include/internal/ntoskrnl.h +++ b/reactos/ntoskrnl/include/internal/ntoskrnl.h @@ -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_ diff --git a/reactos/ntoskrnl/io/iomgr/driver.c b/reactos/ntoskrnl/io/iomgr/driver.c index 2174dc29989..877fd73d5e6 100644 --- a/reactos/ntoskrnl/io/iomgr/driver.c +++ b/reactos/ntoskrnl/io/iomgr/driver.c @@ -197,7 +197,6 @@ IopSuffixUnicodeString( */ VOID FASTCALL -INIT_FUNCTION IopDisplayLoadingMessage(PUNICODE_STRING ServiceName) { CHAR TextBuffer[256]; diff --git a/reactos/ntoskrnl/ps/psmgr.c b/reactos/ntoskrnl/ps/psmgr.c index 25934c950fa..c7f321f1a0d 100644 --- a/reactos/ntoskrnl/ps/psmgr.c +++ b/reactos/ntoskrnl/ps/psmgr.c @@ -242,7 +242,6 @@ PspLookupKernelUserEntryPoints(VOID) NTSTATUS NTAPI -INIT_FUNCTION PspMapSystemDll(IN PEPROCESS Process, IN PVOID *DllBase, IN BOOLEAN UseLargePages) diff --git a/reactos/win32ss/win32kp.h b/reactos/win32ss/win32kp.h index 3748da46e9f..386db09cda0 100644 --- a/reactos/win32ss/win32kp.h +++ b/reactos/win32ss/win32kp.h @@ -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 */