Layout adjustment method for dynamic library, and related device

WO2025044113A1PCT designated stage expired Publication Date: 2025-03-06HUAWEI TECH CO LTD
2 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/079256
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-31
Filing Date
2024-02-29
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

When performing miniaturization of dynamic libraries in the prior art, although useless code can be deleted through the gc-sections function, there are still redundant symbols, resulting in lower returns on miniaturization of software.

Method used

By determining the first symbol and its reference relationship used by the executable file of the software package in the dynamic library, configuring the layout adjustment strategy of the dynamic library, including deleting symbols other than the first symbol and the second symbol or performing hierarchical splitting based on the call frequency, and re-linking operations to achieve miniaturization.

Benefits of technology

Accurately identify the usage of symbols in dynamic libraries by executable files, avoiding the existence of redundant symbols in dynamic libraries, improving the benefits of software miniaturization, and not affecting the normal operation of executable files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024079256_06032025_PF_FP_ABST
    Figure CN2024079256_06032025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a layout adjustment method for a dynamic library, and a related device, both of which are applied to a scenario of miniaturization processing of a dynamic library. The method comprises: determining a first symbol used in a dynamic library by an executable file in a software package; acquiring a reference relationship of the first symbol, wherein the reference relationship indicates a second symbol, which needs to be used together with the first symbol in the dynamic library in an associated manner; on the basis of the reference relationship, configuring a layout adjustment strategy for the dynamic library, wherein the layout adjustment strategy is used for performing miniaturization processing on the dynamic library; and on the basis of the layout adjustment strategy, performing a linking operation on the dynamic library again. In the present application, the symbol required by the executable file during running can be precisely identified by means of the reference relationship of the first symbol, such that miniaturization processing can be performed on the dynamic library on the basis of a symbol that is not required by the executable file, and thus a redundant symbol existing in the dynamic library is avoided, and the volume of software can be reduced to the greatest extent, thereby increasing and optimizing the benefits.
Need to check novelty before this filing date? Find Prior Art

Citation Information

Patent Citations

  • Dynamic library loading optimization method based on minimum symbol redundancy

    CN116643812A

  • Link-time redundant code elimination using functional equivalence

    US20090241098A1