Link Time Optimization Object File Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional link time optimization methods prolong the time required to generate an executable file from a source file, as they fail to efficiently handle cases where link time optimization is executed or not executed, leading to unnecessary object code generation.
Innovation Solution
An information processor with a compiler driver, compiler, cross-file optimization unit, and linker that generates object files with or without object code based on compilation and link commands, omitting unnecessary object code generation and enabling efficient link time optimization by generating object code only when required.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If link time optimization is executed, then optimization across source files is achieved, but the time required to generate an executable file is prolonged due to unnecessary object code generation
Solution Approach 1:
The patent applies preliminary action by generating object files containing source code information without generating object code during the compilation phase when link time optimization is intended. This prepares the necessary information in advance while avoiding the time-consuming object code generation that would otherwise be unnecessary, thus reducing build time while maintaining optimization quality
Solution Approach 2:
The patent extracts and separates the source code information from the object code generation process. By taking out only the necessary source code information into the object file without including the full object code, the system avoids unnecessary processing while preserving the information needed for link time optimization, thereby resolving the time quality trade-off
2Loss of time
If link time optimization is not executed, then build time is reduced, but object code is generated unnecessarily without achieving optimization benefits
Solution Approach 1:
The patent applies dynamics by making the object file generation process adaptive based on the link time optimization setting. The compilation system dynamically adjusts what information to include in object files depending on whether link time optimization will be executed, avoiding unnecessary object code generation when optimization is not planned, thus reducing both build time and resource consumption
Solution Approach 2:
The patent changes the parameter of object file content based on the link time optimization setting. When link time optimization is not executed, the system generates object files with minimal information rather than full object code, effectively using parameter changes to avoid unnecessary processing and reduce resource usage
3Ease of manufacture
If object code is generated during compilation for link time optimization, then the compilation process is complete, but the object code is not linked and processing time is wasted
Solution Approach 1:
The patent uses source code information as an intermediary between compilation and linking. Instead of generating object code during compilation that would later be discarded, the system generates object files containing source code information that serves as a sufficient intermediary for link time optimization, avoiding the wasteful generation of unnecessary object code while maintaining compilation completeness
Solution Approach 2:
The patent treats the generated object files as disposable intermediaries that serve their purpose for link time optimization and then can be replaced by the final optimized object files. By using lightweight object files without full object code during the optimization process, the system avoids creating heavy objects that would be discarded anyway, improving build efficiency
Data Source
AI summary
Upon reception of a first compilation command that contains an instruction for executing link time optimization, the apparatus generates a first object file that contains source-code information including a source code and does not contain an object code. Upon reception of a first link command that contains the instruction for executing the link time optimization, the apparatus generates the object code by executing the link time optimization and compilation on the source code information contained in the first object file, and generates a second object file that contains the generated object code. Upon reception of a second link command that does not contain an instruction for executing the link time optimization, the apparatus generates the object code by executing the compilation on the source code information contained in the first object file, and generates a third object file that contains the generated object code.


