1. A method, comprising: identifying a program code segment implementing an access to a memory area to be executed within a privileged processing mode; replacing the program code segment with a substitute code segment; wherein the substitute code segment includes program code to identify a current processing mode of the program code segment, execute a direct program flow control instruction if the current processing mode is the privileged processing mode, and execute an indirect program flow control instruction if the current processing mode is an unprivileged processing mode.