Dynamic Linking on Embedded Platforms via Pre-computed Relocation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The dynamic linking of programs on embedded platforms using the ELF mode is slow and resource-intensive due to the need to extract information and recalculate addresses, wasting resources and slowing down the linking process.

Innovation Solution

Implementing a middle layer with classes that encapsulate function interfaces and virtual function tables, allowing for Position Independence Codes (PICs) compilation, and using class pointers to dynamically link the application program without recalculating addresses, thereby improving the speed and efficiency of the linking process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If the ELF mode is used for dynamic linking, then the memory space can be saved by not copying function libraries, but the linking speed becomes slow and calculating resources are wasted

Engineering Contradiction:
Improvememory spaceVSAvoidlinking speed
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent pre-generates relocation information during the compilation phase and stores it in the object file. This preliminary action eliminates the need for complex address extraction and recalculation during runtime linking, thus improving linking speed while maintaining memory space efficiency

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts relocation information from the compilation process and separates it as dedicated data structures in the object file. This extraction allows the linker to directly use pre-computed relocation data without performing complex address calculations, resolving the contradiction between memory efficiency and linking speed

Inventive Principle:
Principle #2Taking out (Extraction)

2Adaptability or versatility

If the ELF LOADER program extracts and processes information from the ELF file, then dynamic linking can be implemented, but the process wastes calculating resources and slows down linking

Engineering Contradiction:
Improvedynamic linking capabilityVSAvoidcalculating resources
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The patent performs address relocation calculations during compilation and stores the results in pre-computed relocation information structures. This preliminary computation eliminates the need for resource-intensive address extraction and recalculation during runtime, reducing calculating resource consumption while maintaining dynamic linking capability

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent copies pre-computed relocation information from the object file directly into the executable image during linking. This copying approach replaces the need for complex address extraction and recalculation, significantly reducing calculating resource usage while preserving full dynamic linking functionality

Inventive Principle:
Principle #26Copying

Data Source

PatentUS8499291B2Method for dynamically linking program on embedded platform and embedded platform
Publication Date: 2013.07.30 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US8499291B2 patent drawing
  • US8499291B2 patent drawing
  • US8499291B2 patent drawing

AI summary

The examples of the present invention disclose a method for dynamically linking a program on an embedded platform and an embedded platform. The embedded platform includes a middle layer which comprises at least one class. An application program to be linked includes at least one class. The application program is compiled into PICs, wherein storage positions of different code sections in the PICs which are obtained by compiling different functions of the application program do not overlap with each other; all the PICs are copied into a memory of the embedded operation system; a class pointer is created, and the class pointer is transferred between the class of the middle layer and the class of the application program to dynamically link the application program.