[fpc-devel]Native NT executables?

KJK::Hyperion noog at libero.it
Sun Oct 14 20:31:32 CEST 2001


At 12.42 13/10/2001 +0200, you wrote:
>I'm not sure what you are referring to. The Win32 compiler compiles native 
>windows binaries. Device drivers are of course a whole different matter.

There are two categories of Windows 32 bit executables:
  - LE executables: VXD device drivers (these MUST be partly written in 
ASM, and MUST follow a special preprocess-compile-link process)
  - PE executables: anything else

But Windows NT doesn't use LE format for drivers (VXD's are a ugly hack to 
retain DOS compatibility), NT device drivers are just PE dll's linked to 
the right libraries and, more important, with a completely different SEH 
model. dd's belong in turn to a wider category: NT Native executables. Note 
that Win32 means "anything running over the Win32 subsystem" (implemented 
in two native executables, csrss.exe and win32k.sys), but it doesn't mean 
"any 32 bit PE executable running on Windows". In fact 32 bit PE's can be 
even NT-POSIX or OS/2, or the aforementioned Native exes. Let's say that an 
exe is Native if it interfaces only to the kernel (via ntdll.dll) and/or 
the hardware (via hal.dll)

>I think that you would need 2 things:
>- Cross linker (I assume device drivers need a special link script)
>   But this is not something FPC handles; as we use GNU binutils for that.
>- A special system unit, which would override some of the system routines.
>   How to do this is being documented (docs/internal/arch.tex).

thanks! I'll let you know if I obtain anything barely working





More information about the fpc-devel mailing list