Object Code Relocation Analysis for Function Change Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing hot update systems fail to accurately determine which functions within a computer program are changed by a source code modification, particularly due to issues with implicit casting and extraneous differences when analyzing at the source code layer, rather than the object code layer.
Innovation Solution
The method operates at the object code layer, using modified compilers to generate relocations for function and data structure references, and compares pre and post object code to identify changed functions by excluding equivalent relocation differences.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If source code layer analysis is used to determine changed functions, then the method is simple to implement, but it fails to handle implicit casting and function inlining correctly
Solution Approach 1:
The patent replaces source code layer analysis with object code layer analysis. Instead of manually parsing source code to detect changes, the system uses compiled object code with relocation entries to automatically identify changed functions. This substitution of analysis layer resolves the contradiction by providing precise detection of implicit casting and inlining effects that source code analysis misses.
Solution Approach 2:
The patent introduces relocation entries as an intermediary mechanism between source code modifications and function change detection. These relocation entries serve as a mediator that captures the actual runtime impact of source code changes, enabling accurate detection without requiring direct source code parsing or semantic analysis.
2Device complexity
If source code layer analysis is used, then no compiler modification is needed, but extraneous differences are introduced due to location assumptions in object code
Solution Approach 1:
The patent performs preliminary action by modifying the compiler to generate relocation entries during the compilation phase. This preliminary preparation enables precise difference detection later without requiring complex analysis during the actual comparison, as the relocation entries are already in place to guide accurate matching.
Solution Approach 2:
The patent changes the parameter of analysis from source code text to object code relocation entries. By shifting the analysis domain to object code and using relocation entries as the comparison parameter, the system eliminates extraneous differences caused by location assumptions while maintaining the ability to detect actual function changes.
3Measurement precision
If object code layer analysis is used, then accuracy of changed function detection is improved, but compiler modification is required
Solution Approach 1:
The patent applies self-service by having the compiler itself generate the relocation entries needed for analysis. Instead of requiring external tools to create analysis data, the compiler automatically produces relocation entries as part of its normal operation, eliminating the need for complex external analysis systems while maintaining precision.
4Measurement precision
If implicit casting effects are considered, then complete function change detection is achieved, but programming language semantics knowledge is required
Solution Approach 1:
The patent substitutes semantic analysis with mechanical relocation entry comparison. Instead of requiring knowledge of C language semantics to understand implicit casting, the system uses objective relocation entry data that automatically reflects the impact of casting changes, eliminating the need for semantic interpretation while maintaining complete detection accuracy.
Data Source
AI summary
A method of determining which computer program functions are changed by a source code modification to a computer program's source code. The method includes compiling the computer program's source code, using a compiler that generates a relocation entry for each program access to a program function or a program data item. The method further includes compiling source code resulting from modifying the computer program's source code with the source code modification, using a compiler that generates a relocation entry for each program access to a program function or a program data item The method further includes constructing a list of object code differences by comparing the compiled source code, and excluding from the list specified object code differences.


