[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 30 Dec 2018 11:19:11 +0000 (12:19 +0100)
committerGitHub <noreply@github.com>
Sun, 30 Dec 2018 11:19:11 +0000 (12:19 +0100)
commit71fefa32db013317842fd9224b63bcf5f72f2e32
tree95bcae0f167d02321e5b40aa93e0b9680f8b6055
parent7c66247343697b5f1fe67207f850d1d88f232932
[NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)

* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
108 files changed:
boot/freeldr/freeldr/CMakeLists.txt
boot/freeldr/freeldr/freeldr_i386.lds
drivers/filesystems/fastfat/fastio.c
drivers/filesystems/fastfat/iface.c
drivers/filesystems/fastfat/vfat.h
drivers/filesystems/mup/dfs.c
drivers/filesystems/mup/dfs.h
drivers/filesystems/mup/mup.c
drivers/filesystems/mup/mup.h
drivers/filesystems/ntfs/ntfs.c
drivers/filesystems/ntfs/ntfs.h
hal/halx86/acpi/busemul.c
hal/halx86/acpi/halacpi.c
hal/halx86/apic/rtctimer.c
hal/halx86/generic/cmos.c
hal/halx86/generic/dma.c
hal/halx86/generic/halinit.c
hal/halx86/generic/misc.c
hal/halx86/generic/timer.c
hal/halx86/generic/usage.c
hal/halx86/include/bus.h
hal/halx86/include/halacpi.h
hal/halx86/include/halp.h
hal/halx86/legacy/bus/pcibus.c
hal/halx86/legacy/bus/sysbus.c
hal/halx86/legacy/bussupp.c
hal/halx86/legacy/halpcat.c
hal/halx86/up/halinit_mini.c
ntoskrnl/cache/newcc.h
ntoskrnl/cc/cacheman.c
ntoskrnl/config/cmalloc.c
ntoskrnl/config/cmboot.c
ntoskrnl/config/cmconfig.c
ntoskrnl/config/cmcontrl.c
ntoskrnl/config/cmdata.c
ntoskrnl/config/cmdelay.c
ntoskrnl/config/cmhook.c
ntoskrnl/config/cmkcbncb.c
ntoskrnl/config/cmsysini.c
ntoskrnl/ex/handle.c
ntoskrnl/ex/hdlsterm.c
ntoskrnl/ex/init.c
ntoskrnl/ex/lookas.c
ntoskrnl/ex/pushlock.c
ntoskrnl/ex/resource.c
ntoskrnl/ex/xipdisp.c
ntoskrnl/fsrtl/fsrtlpc.c
ntoskrnl/fsrtl/stackovf.c
ntoskrnl/inbv/inbv.c
ntoskrnl/include/internal/amd64/mm.h
ntoskrnl/include/internal/cc.h
ntoskrnl/include/internal/cm.h
ntoskrnl/include/internal/dbgk.h
ntoskrnl/include/internal/ex.h
ntoskrnl/include/internal/fsrtl.h
ntoskrnl/include/internal/i386/ke.h
ntoskrnl/include/internal/inbv.h
ntoskrnl/include/internal/io.h
ntoskrnl/include/internal/ke.h
ntoskrnl/include/internal/lpc.h
ntoskrnl/include/internal/mm.h
ntoskrnl/include/internal/ntoskrnl.h
ntoskrnl/include/internal/ob.h
ntoskrnl/include/internal/po.h
ntoskrnl/include/internal/ps.h
ntoskrnl/include/internal/se.h
ntoskrnl/io/iomgr/arcname.c
ntoskrnl/io/iomgr/driver.c
ntoskrnl/io/iomgr/ramdisk.c
ntoskrnl/io/iomgr/rawfs.c
ntoskrnl/io/pnpmgr/pnpinit.c
ntoskrnl/io/pnpmgr/pnpmgr.c
ntoskrnl/ke/amd64/kiinit.c
ntoskrnl/ke/config.c
ntoskrnl/ke/i386/cpu.c
ntoskrnl/ke/i386/kiinit.c
ntoskrnl/ke/i386/mtrr.c
ntoskrnl/ke/i386/patpge.c
ntoskrnl/ke/krnlinit.c
ntoskrnl/lpc/port.c
ntoskrnl/mm/ARM3/expool.c
ntoskrnl/mm/ARM3/i386/init.c
ntoskrnl/mm/ARM3/largepag.c
ntoskrnl/mm/ARM3/miarm.h
ntoskrnl/mm/ARM3/mminit.c
ntoskrnl/mm/ARM3/pool.c
ntoskrnl/mm/ARM3/procsup.c
ntoskrnl/mm/ARM3/sysldr.c
ntoskrnl/mm/ARM3/syspte.c
ntoskrnl/mm/mminit.c
ntoskrnl/ob/obinit.c
ntoskrnl/ob/obname.c
ntoskrnl/ob/obsdcach.c
ntoskrnl/po/power.c
ntoskrnl/ps/apphelp.c
ntoskrnl/ps/job.c
ntoskrnl/ps/psmgr.c
ntoskrnl/ps/quota.c
ntoskrnl/se/semgr.c
ntoskrnl/vdm/vdmmain.c
sdk/cmake/msvc.cmake
sdk/include/ndk/halfuncs.h
sdk/include/ndk/inbvfuncs.h
sdk/include/ndk/kefuncs.h
sdk/include/ndk/section_attribs.h [new file with mode: 0644]
win32ss/gdi/eng/ldevobj.h
win32ss/user/ntuser/main.c
win32ss/win32kp.h