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, wherein at least one address according to said target architecture is a 64-bit address, the method comprising: receiving by a processor said first program comprising first executable code compiled to execute on a source architecture and comprising a load module; 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, wherein the set of addresses that are exposed for external reference are 32-bit addresses; 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, wherein the entries in the index corresponding to the set of addresses that are exposed for external reference in the index are inserted into the object code rather than inserting 64-bit addresses of the target architecture for those entries, wherein entries in the index are assigned an external reference, wherein a linker assigns the external references assigned to the entries in the index to 64-bit addresses allocated to 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. receiving by a processor said first program comprising first executable code compiled to execute on a source architecture and comprising a load module; 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, wherein the set of addresses that are exposed for external reference are 32-bit addresses; 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, wherein the entries in the index corresponding to the set of addresses that are exposed for external reference in the index are inserted into the object code rather than inserting 64-bit addresses of the target architecture for those entries, wherein entries in the index are assigned an external reference, wherein a linker assigns the external references assigned to the entries in the index to 64-bit addresses allocated to 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.