Index: hal/halx86/include/halp.h =================================================================== --- hal/halx86/include/halp.h (revision 68935) +++ hal/halx86/include/halp.h (working copy) @@ -4,15 +4,12 @@ #pragma once -#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 _MSC_VER Index: ntoskrnl/config/cmse.c =================================================================== --- ntoskrnl/config/cmse.c (revision 68935) +++ ntoskrnl/config/cmse.c (working copy) @@ -16,9 +16,9 @@ /* FUNCTIONS *****************************************************************/ +//INIT_FUNCTION PSECURITY_DESCRIPTOR NTAPI -INIT_FUNCTION CmpHiveRootSecurityDescriptor(VOID) { NTSTATUS Status; Index: ntoskrnl/include/internal/dbgk.h =================================================================== --- ntoskrnl/include/internal/dbgk.h (revision 68935) +++ ntoskrnl/include/internal/dbgk.h (working copy) @@ -47,7 +47,6 @@ #endif VOID -INIT_FUNCTION NTAPI DbgkInitialize( VOID Index: ntoskrnl/include/internal/io.h =================================================================== --- ntoskrnl/include/internal/io.h (revision 68935) +++ ntoskrnl/include/internal/io.h (working copy) @@ -662,7 +662,6 @@ ); NTSTATUS -INIT_FUNCTION IopInitPlugPlayEvents(VOID); NTSTATUS Index: ntoskrnl/include/internal/ntoskrnl.h =================================================================== --- ntoskrnl/include/internal/ntoskrnl.h (revision 68935) +++ ntoskrnl/include/internal/ntoskrnl.h (working copy) @@ -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_ Index: ntoskrnl/io/iomgr/driver.c =================================================================== --- ntoskrnl/io/iomgr/driver.c (revision 68935) +++ ntoskrnl/io/iomgr/driver.c (working copy) @@ -197,7 +197,6 @@ */ VOID FASTCALL -INIT_FUNCTION IopDisplayLoadingMessage(PUNICODE_STRING ServiceName) { CHAR TextBuffer[256]; Index: ntoskrnl/ps/psmgr.c =================================================================== --- ntoskrnl/ps/psmgr.c (revision 68935) +++ ntoskrnl/ps/psmgr.c (working copy) @@ -242,7 +242,6 @@ NTSTATUS NTAPI -INIT_FUNCTION PspMapSystemDll(IN PEPROCESS Process, IN PVOID *DllBase, IN BOOLEAN UseLargePages) Index: win32ss/win32kp.h =================================================================== --- win32ss/win32kp.h (revision 68935) +++ win32ss/win32kp.h (working copy) @@ -10,16 +10,13 @@ #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 +#define INIT_SECTION /* Done via alloc_text for MSC */ +#define INIT_FUNCTION INIT_SECTION #endif -#else -#define INIT_FUNCTION -#endif /* Enable debugging features */ #define GDI_DEBUG 0