Binary File Function Insertion via Control Flow Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for modifying executable binary files are limited, as they require forethought in defining paths and cannot easily add new capabilities or override existing functions without recompiling or using source files.

Innovation Solution

A software tool that merges object files into binary files by updating the symbol table, allowing for the insertion or redefinition of functions without using a link editor, and utilizing control flow analysis for intelligent insertion.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If interposition technique is used to dynamically link object files, then functionality can be added to binary files, but forethought is required to define paths in the interposition file and the new object file must accompany the binary file

Engineering Contradiction:
Improvefunctionality extensionVSAvoidpath configuration complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent extracts the object code from its original object file context and directly embeds it into the binary file. By removing the dependency on external object files and interposition path configurations, the functionality is self-contained within the binary, eliminating the need for separate object file management and path definition complexity

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent merges the object code with the binary file by directly inserting the object code bytes into the binary file at determined locations. This combining of previously separate entities (binary file and object file) into a single integrated unit eliminates the need for external linking and path configuration, resolving the complexity issue while maintaining functionality extension capability

Inventive Principle:
Principle #5Merging (Combining)

2Adaptability or versatility

If conventional means are used to modify binary files, then simple instrumentation can be performed, but extensive modification such as adding new functions or overriding existing functions is not possible

Engineering Contradiction:
Improvemodification capabilityVSAvoidbinary file modification ease
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The patent implements a dynamic approach to binary file modification by providing a systematic method that can adapt to different modification needs (adding new functions, overriding existing functions, or simple instrumentation). The process dynamically determines insertion locations based on control flow analysis and symbol table updates, making extensive modifications as easy as simple instrumentation

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces a software tool as an intermediary that automates the complex process of binary file modification. This tool handles control flow analysis, symbol table updates, and object code insertion, making extensive binary modifications accessible without requiring deep technical expertise or complex manual processes

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If a software tool inserts code from an object file into a binary file and updates the symbol table, then functions can be added or overridden without recompiling, but the tool must perform control flow analysis and symbol table updates

Engineering Contradiction:
Improvemodification speedVSAvoidtool complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent performs preliminary actions by conducting control flow analysis and updating the symbol table before inserting the object code. By preparing the binary file structure and symbol information in advance, the actual code insertion becomes a straightforward operation that achieves rapid modification without requiring complex runtime processing or recompilation

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8418122B2Incorporating functionality from an object file into an existing binary file
Publication Date: 2013.04.09 ORACLE AMERICAN INC
  • US8418122B2 patent drawing
  • US8418122B2 patent drawing
  • US8418122B2 patent drawing

AI summary

Functionality from an object file can be incorporated into an already existing binary file. Functions from the object file can be intelligently inserted into the binary file with the guidance of control flow analysis of both the binary file and the object file. Symbols not defined in the symbol table of the binary file are added to the symbol table of the binary file. When symbols of the object file and the binary file overlap, then priority is given to the object file symbol definitions. The ability to incorporate functionality from an object file into an existing binary file reduces logistical overhead and provides flexibility in code development and maintenance.