Binary-to-IR Matching Through Internal Annotation Entries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods fail to accurately associate run-time locations in executable code with corresponding intermediate representation (IR) entities that are not referenced by the global IR symbol table, leading to inaccuracies in statistical analysis and management tasks.

Innovation Solution

Add internal annotation entries to the IR for locations not referenced by the global IR symbol table, allowing these entries to be propagated to the executable object, and update them to reference run-time locations during linking or loading, ensuring accurate association between IR and executable code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If only global IR symbol table is used to reference IR entities, then the symbol table structure remains simple, but internal IR locations cannot be associated with run-time locations

Engineering Contradiction:
Improveassociation accuracy between IR and executable codeVSAvoidIR annotation structure complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The annotation system is segmented into two distinct parts: global annotation entries for IR entities referenced by the global symbol table, and internal annotation entries for internal IR locations. This segmentation allows the system to track both external and internal IR locations without overwhelming complexity, enabling accurate association of internal locations with run-time locations while maintaining a structured approach to annotation management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent adds a new dimension to the annotation structure by introducing internal annotation entries that reference internal IR locations, complementing the existing global annotation entries. This dimensional expansion transforms the annotation system from a single-level global reference structure to a multi-level structure that encompasses both global and internal references, enabling comprehensive tracking of all IR locations.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If internal annotation entries are added to propagate internal IR locations, then association accuracy improves, but the complexity of the annotation and linking process increases

Engineering Contradiction:
Improveaccuracy of statistical analysisVSAvoidannotation entry management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Internal annotation entries are created during the IR compilation phase, before the linking process. This preliminary action ensures that all internal IR locations are pre-identified and annotated with their corresponding internal locations, so that during linking, the system only needs to perform address resolution using the existing annotation infrastructure, rather than having to discover and create annotations on-the-fly.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary mechanism where internal annotation entries serve as mediators between internal IR locations and run-time locations. These annotation entries act as a bridge that connects the IR representation to the executable code, enabling accurate association without requiring direct complex interactions between the compiler and linker systems.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If comprehensive annotation entries are propagated to executable object, then matching accuracy between binary and IR code improves, but the processing time during linking and loading increases

Engineering Contradiction:
Improvebinary code to IR code matching accuracyVSAvoidlinking and loading time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

All annotation entries, including internal annotation entries for internal IR locations, are created and prepared during the IR compilation phase before the linking process begins. This preliminary preparation ensures that when the executable object is linked and loaded, the annotation matching process can proceed efficiently by simply resolving addresses using pre-computed annotations, rather than performing complex analysis during linking and loading.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12393407B2Matching binary code to intermediate representation code
Publication Date: 2025.08.19 NEXTSILICON LTD
  • US12393407B2 patent drawing
  • US12393407B2 patent drawing
  • US12393407B2 patent drawing

AI summary

A system for generating executable code of a software program that is matched with an intermediate representation (IR) of a source code of the software program. The system comprises a processor adapted for adding one or more annotation entries, each for a location in the IR, to program data in the IR. An internal annotation entry is generated for an internal location in the IR that is not referenced by an IR symbol in the global IR symbol table of the IR. The processor is further adapted for compiling the IR to produce a binary object comprising the annotation entries, and providing the binary object to a linker or to a dynamic loader to update in an executable object an executable internal annotation entry associated with an internal annotation entry to reference run-time location in the executable object.