You can use the /GA and /GD command-line options with __export to selectively optimize the entry or exit code for protected mode Windows applications and dynamic-link libraries.