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

Dynamic link library implementation method and system, computer equipment and storage medium

A technology of a dynamic link library and an implementation method, which is applied in the field of systems, computer equipment and storage media, and the implementation method of a dynamic link library, and can solve problems such as performance overhead and code segment expansion, so as to eliminate performance loss, eliminate code expansion, and improve performance Effect

Active Publication Date: 2020-08-25
FOSHAN POLYTECHNIC
View PDF3 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Of course, this approach does not require the compiler to support PIC, and you can only keep a code segment, but when the library has only one process reference, we still need to provide the structure object pointer of the library, and always access global variables. will start from this pointer, which causes unnecessary performance overhead and also causes the expansion of the code segment

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
  • Dynamic link library implementation method and system, computer equipment and storage medium
  • Dynamic link library implementation method and system, computer equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0022] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. It is only stated here that the words for directions such as up, down, left, right, front, back, inside, and outside that appear or will appear in the text of the present invention are only based on the accompanying drawings of the present invention, and are not specific to the present invention. limited.

[0023] Such as figure 1 As shown, the invention provides a dynamic link library implementation method, including:

[0024] S101, scan the global variables in the source code of the library file and define the global variables with a macro,

[0025] S102, adding a structure pointer parameter represented by a macro definition to each function of the non-C runtime library in the source code of the library file;

[0026] S103, creating a header file and declaring ...

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 discloses a dynamic link library implementation method. The method comprises the steps of scanning a global variable in a source code of a library file and defining the global variable by using a macro, adding a structural body pointer parameter represented by macro definition to a function of each non-C runtime library in the source code of the library file, creating a header file and declaring a structural body pointer comprising all global variables, thereby obtaining a library file meeting format requirements; and detecting a link mode of the library file and correspondinglyconfiguring the library file according to the link mode. By adopting the method and the device, the cross-tool-chain availability of the dynamic link library in a microcontroller environment can be greatly improved, and the performance of the library under a static link condition is improved.

Description

technical field [0001] The invention relates to the field of embedded systems, in particular to a dynamic link library realization method, system, computer equipment and storage medium. Background technique [0002] With the rise of Industry 4.0 and the Internet of Things, embedded devices are becoming more and more complex, so there are single-chip microcomputers with multiple partitions and running process models. However, between multiple processes, there are often dynamically shared code segment parts, which are common to each process, but data segments are different for each process. On a processor with an MMU, we usually use the page table to map the data segments placed in different physical memory addresses of each process to the same virtual address in different processes, so that even if the virtual addresses of the data segments are different, it is not necessary to use Compiler's (PIC). But the situation is different on microcontrollers: To use any dynamic link...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/30G06F8/41
CPCG06F8/31G06F8/41Y02D10/00
Inventor 肖志良曾绍稳
Owner FOSHAN POLYTECHNIC
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