To make your Delphi application more secure, and support the No-Execute (NX) page protection feature, use the $SetPEOptFlags directive.

To do so, use {$SetPEOptFlags $100}.

This causes Windows to use the AMD NX (No-Execute) feature, or Intel XD (Disable Execution) and marks all memory locations in a process as non-executable unless the application marks the memory region as executable using VirtualAlloc* or VirtualProtect APIs.