Load module compiler
AssigneeLzlabs GmbH
InventorsJan Jaeger, Thomas D. Grieve
Life of this patent
Estimating the term…
Abstract
The disclosure invention provides a method for executing a program compiled for a source architecture on a machine having a different target architecture, a non-transitory computer readable medium configured to store instructions for performing such a method, and a system for performing such a method.
Claims21
A computer implemented method for executing a first program compiled for a source architecture on a machine having a target architecture different from the source architecture, the method comprising:
- receiving by a processor said first program comprising first executable code compiled to execute on a source architecture;
- decompiling a load module of the first program into intermediate computer code formatted according to an intermediate code format;
- identifying a set of addresses that are exposed for external reference by a second program compiled to execute on the source architecture;
- storing in a computer memory an index of said set of addresses that are exposed for external reference, wherein the index comprises values that correspond to invalid addresses in the target architecture;
- recompiling the intermediate computer code into target executable code configured for the target architecture;
- incorporating the index of said set of addresses into the target executable code;
- and
- executing said target executable code on a processor having said different target architecture, wherein said executing generates at least one invalid address and said invalid address is translated into a valid address using the incorporated index in the target executable code.
A non-transitory computer readable medium configured to store instructions, the instructions when executed by one or more processors cause the one or more processors to execute a first program compiled for a source architecture on a machine having a target architecture different from the source architecture by performing steps comprising:
- receiving by a processor said first program comprising first executable code compiled to execute on a source architecture;
- decompiling by a decompilation module executing on the processor the load module into intermediate computer code formatted according to an intermediate code format;
- identifying by the decompilation module the set of addresses that are exposed for external reference by a second program compiled to execute on the source architecture;
- storing in a computer memory an index of said addresses that are exposed for external reference, wherein the index values correspond to a range of invalid addresses in the target architecture;
- recompiling by a compiler module, the intermediate code into target executable code configured for the target architecture, wherein the compiler module incorporates the index of said addresses into the target executable code;
- and
- executing said target executable code on a processor having said different target architecture, wherein said executing generates at least one invalid address and wherein an exception handler translates said invalid address into a valid address using the incorporated index.
A system for executing a first program compiled for a source architecture on a machine having a target architecture different from the source architecture, the system comprising:
- a first platform comprising one or more processors of a source architecture;
- a decompiler installed on the first platform and configured to execute on a processor of the one or more processors of said source architecture, the decompiler adapted to:
- receive said first program comprising first executable code compiled to execute on a source architecture;
- decompile a load module of the first program into intermediate computer code formatted according to an intermediate code format;
- identify a set of addresses that are exposed for external reference by a second program compiled to execute on the source architecture;
- and
- store in a computer memory an index of said set of addresses that are exposed for external reference, wherein the index comprises values that correspond to invalid addresses in the target architecture;
- a second platform, comprising one or more processors of a target architecture, wherein the second platform is coupled to the first platform through a computer network;
- a compiler installed on the second platform adapted to execute on a processor of the target architecture, the compilation module adapted to receive the intermediate computer code and the index generated by the decompilation module, to compile the intermediate code into an executable program of the target architecture comprising machine code of the target architecture, and to incorporate the index of the set of addresses into the executable program of the target architecture;
- and
- an exception handler installed on the second platform wherein, in response to detection by a processor of the second platform of the execution of an instruction to access an invalid address, said exception handler translates said invalid address into a valid address using the incorporated index in the executable program of the target architecture.
Dependencies are inferred from the claim text.