Load Module Compiler for Cross-Architecture Execution
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for translating computer programs from one architecture to another often disrupt interoperability by changing addresses and instruction sets, making it difficult to execute legacy load modules on different architectures without rewriting the source code, especially when external references are involved.
Innovation Solution
A method that decompiles a load module into intermediate code, identifies and indexes external addresses, and recompiles it for a new architecture, incorporating the index to handle invalid addresses and maintain external reference functionality, using a system with a decompilation module, compiler module, and exception handler to ensure compatibility and performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a load module is decompiled and recompiled for a different target architecture, then the program can execute on the new architecture, but external references will not operate correctly due to different addressing schemes
Solution Approach 1:
The patent introduces an intermediary translation layer that converts architecture-specific addressing schemes into a universal reference format. When code is decompiled from source architecture to intermediate representation, the translation module preserves external reference integrity by mapping addresses through a canonical form that works across both 32-bit and 64-bit architectures, preventing reference breakage during recompilation.
Solution Approach 2:
The system dynamically adjusts addressing parameters based on the target architecture. During recompilation, the translator modifies address width and formatting parameters to match the target architecture's requirements while maintaining the semantic meaning of external references. This allows the same intermediate code to be correctly compiled for either 32-bit or 64-bit systems without losing external reference functionality.
2Productivity
If optimizing compilers are used to improve executable performance, then execution speed increases, but information is lost that cannot be fully recovered using a decompiler
Solution Approach 1:
The system performs preliminary analysis of the optimized machine code to identify and reconstruct lost source-level information before decompilation begins. By examining optimization patterns, control flow graphs, and data flow analysis results in the compiled code, the translator can infer original source structure, variable declarations, and semantic information that would otherwise be permanently lost, enabling more accurate reconstruction of the source program.
3Adaptability or versatility
If decompilation is performed to translate code between architectures, then code portability is achieved, but the process is complicated by difficulty in separating computer code from data
Solution Approach 1:
The decompilation system segments the translation process into distinct modular stages: code identification, data identification, separation analysis, and translation. Each stage handles specific aspects of the code-data separation problem independently, using different algorithms and heuristics appropriate to that stage. This modular segmentation reduces overall process complexity by breaking down the difficult unified problem into manageable sub-problems that can be solved sequentially.
Data Source
Figure 1
Figure 2
Figure 3~5
AI summary
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.