New target: Native NT user- and kernelmode
Original Reporter info from Mantis: PascalDragon @PascalDragon
-
Reporter name: Sven Barth
Original Reporter info from Mantis: PascalDragon @PascalDragon
- Reporter name: Sven Barth
Description:
Some months ago (April) I asked on the fpc-pascal mailing list whether Native NT as a new target is welcomed... well... I finally reached a state where I can publish the changes ;)
This are only the changes for the compiler; I will add the RTL in an extra issue in a couple of minutes :)
Targetname: nativent
Supported platforms: i386 (for now)
Supported apptypes: default and native (the last one to activate kernel mode)
Supported linkers: internal only
To Do:
* add msfastcall calling convention (only then the kernel mode code will be really useful)
* (maybe) add a apptype "kernel" to replace "native" for this target (might be used for Linux, too)
* (maybe) move most of TInternalLinkerWin functionality in a base class (TInternalLinkerPE?) to ease sharing of code between Win32/64, NativeNT, Interix (also on my list :) ) and usermade additional subsystems
If you want me to improve/correct anything in this patch, please don't hesitate to tell me!
Additional information:
Now some statements, why I changed some parts in the compiler as I did:
* in systems.pas I added "systems_nativent" for all Native NT systems. For now this only contains the i386 one, but I'd like to add x86_64, ARM and PowerPC as well (the latter two are only ReactOS ones)
* in t_win.pas I moved the writing of the entry name in a extra method "ConcatEntryName", because NativeNT shares all code besides this and the sysinit name with the Windows linker (that's why I suggested a base class above)
* in ogcoff.pas I added the flag PE_SCN_MEM_NOT_PAGED to all PE sections, because this was a source of "PAGE_FAULT_IN_NON_PAGED_AREA"-Bluescreens during driver-startup
Mantis conversion info:
- Mantis ID: 14886
- Fixed in version: 2.6.0
- Fixed in revision: 14565 (#34227e81)