Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Program dynamic loading method, program dynamic loading device and storage medium

A dynamic loading and program technology, applied in the field of computer program compilation, can solve the problems of occupying FLASH space, unable to realize dynamic loading, low relocation efficiency, etc., achieving fast loading and running speed, saving FLASH and RAM space, and reducing the volume. Effect

Active Publication Date: 2020-05-08
北京翼辉信息技术有限公司
View PDF4 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] In the first method, because the loading process needs to copy the APP executable file to RAM, the loading speed is slow
In the second method, the code segment and data segment must be loaded into the memory as a whole and relocated. Since the APP executable file needs to be copied to RAM for execution, it is impossible to load more complex APPs on an MCU with a shortage of RAM. , when the APP executable file is large, due to memory limitations, dynamic loading cannot be realized. There are many relocation methods in the original ELF file. The loader needs to perform corresponding searches and calculations according to different methods, and then modify The data corresponding to the address in the memory has low relocation efficiency. In addition, because there is a large amount of runtime-independent information in the ELF file generated by compilation, some are related to loading data, and some are related to debugging, resulting in a large ELF size and occupying A lot of FLASH space

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Program dynamic loading method, program dynamic loading device and storage medium
  • Program dynamic loading method, program dynamic loading device and storage medium
  • Program dynamic loading method, program dynamic loading device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain related inventions, rather than to limit the invention. It should also be noted that, for the convenience of description, only the parts related to the related invention are shown in the drawings.

[0032] It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and embodiments.

[0033] figure 1 A method for dynamically loading programs of the present invention is shown, the method comprising:

[0034] The compiling step S101 is compiling the source code into an address-independent program file using compiling parameters. The program described in t...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a program dynamic loading method, a program dynamic loading device and a storage medium. The method comprises the following steps: compiling: employing compiling parameters to compile a source code into an address-independent program file; performing relocation preprocessing: calculating a relocation address and a logic address needing to be filled into the relocation address for the program file according to the relocation item type after compiling is completed, and downloading the preprocessed program file to any position of FLASH; and loading: loading data required byprogram operation based on the calculated relocation address and the logic address needing to be filled into the relocation address, and directly operating the program file in FLASH. The method avoids the process of copying the APP file from the FLASH to the RAM, increases the application starting speed, reduces the program size, does not limit the application starting address, does not limit theapplication storage address, realizes direct operation of the APP on FLASH, is suitable for being operated on small devices such as an MCU, and supports debugging of the dynamically loaded APP.

Description

technical field [0001] The invention relates to the technical field of computer program compilation, in particular to a program dynamic loading method, device and storage medium. Background technique [0002] There are mainly two technical solutions for the dynamic loading of application programs in existing operating systems: [0003] The first way is to use the overall loading method: first compile and link the application program with a fixed running address; then when the application program is dynamically loaded, copy the application executable file as a whole to the memory area at the specified address; finally execute it from the memory code. [0004] The second way is to use the dynamic link file method: first use gcc -shared -fPIC to compile the address-independent code; then dynamically load it to the address 0x00000000; at runtime, use PC + offset to obtain the internal data of the module, and PC + offset Get the GOT table address by measuring, and then get the ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F9/445G06F8/41
CPCG06F9/44505
Inventor 韩辉
Owner 北京翼辉信息技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products