| CPC G06F 21/44 (2013.01) | 19 Claims |

|
1. A method comprising:
compiling, by a processor in a compiling phase, a software program intended to be executed by the processor, the processor having secure and non-secure access right level execution contexts, and privileged and non-privileged access right level execution contexts;
generating, in the compilation phase, instructions in machine language having an exclusively secure access right level when the instructions are intended to be executed in the secure access right level execution context, and instructions having a non-privileged access right level when the instructions are intended to be executed in the non-privileged access right level execution context,
wherein generating, in the compilation phase, the instructions comprises:
generating the instructions in the machine language irrespective of the execution contexts to which the instructions are intended to be executed, and
post-processing the generated instructions thereby replacing at least some generated instructions having an access right level not corresponding to an access right level of its execution context with instructions having the access right level corresponding to the access right level of its execution context,
wherein generating, in the compilation phase, the instructions comprises generating the instructions in the machine language from a source code in programming language, and
wherein post-processing is implemented on at least one group of instructions intended to be executed in the same execution context, the at least one group of instructions being selected in at least one of the following forms:
functions having a declaration communicating the selection in the source code in the programming language;
objects belonging to an intermediate object file, generated upon compilation; or
areas with contiguous memory addresses containing binary data encoding the machine language instructions, generated upon the compilation.
|