What Is a Dynamic Linker?

Dynamic Linking in English is Dynamic Linking. It enables different program developers and departments to develop and test their own program modules relatively independently. In a sense, it greatly promotes the efficiency of program development. The original limitation of the program size also varies with Expansion. However, many shortcomings of slowly linking are gradually exposed, such as wasting memory and disk space, and difficulty in updating modules, making people have to find a better way to organize the modules of the program.

Dynamic Linking in English is Dynamic Linking. It enables different program developers and departments to develop and test their own program modules relatively independently. In a sense, it greatly promotes the efficiency of program development. The original limitation of the program size also varies with Expansion. However, many shortcomings of slowly linking are gradually exposed, such as wasting memory and disk space, and difficulty in updating modules, making people have to find a better way to organize the modules of the program.

Dynamic link definition

Dynamic linking in English is the simplest way that Dynamic Linking needs to solve the two problems of wasted space and difficulty in updating. It is to separate the program modules from each other to form independent files instead of statically linking them together. Simply put, it is not to link the object files that make up the program, and wait until the program is running. In other words, postponing the linking process to run time is the basic idea of Dynamic Linking.

Introduction to Dynamic Links

Dynamic linking. The library is loaded by the operating system's loader when the executable is loaded or at runtime. Most operating systems resolve external references (such as libraries) as part of the loading process. On these systems, the executable contains a table called the import directory, each entry of the table containing the name of a library. According to the names recorded in the table, the loader searches the required library on the hard disk, then loads it into an indeterminate location in memory, and then updates the executable program according to the address of the library determined after loading the library. The executable program calls functions in the library or references data in the library according to the updated library information. This type of dynamic loading becomes load-on-load and is used by most systems including Windows and Linux.
One of the most complex tasks the operating system has to do when loading application software is linking at load time.
Other operating systems may resolve references at runtime. On these systems, the executable program calls the operating system API, passing the name of the library, the number of the function in the library, and the function parameters together. The operating system is responsible for parsing immediately and then calling the appropriate function on behalf of the application. This dynamic linking is called runtime linking. Because each call has system overhead, runtime linking is much slower and has a negative impact on application performance. Modern operating systems have rarely used runtime linking.
Libraries that can be dynamically linked are dynamic link library (DLL) on Windows and Shared Library on UNIX or Linux. A library file is a pre-compiled and linked executable file that is stored on the computer's hard disk. In most cases, multiple applications can use the same copy of a library at the same time, and the operating system does not need to load multiple instances of this library.

Comparison of dynamic link and dynamic link

Dynamic link static link

advantage:
The code is fast to load and executes slightly faster than the dynamic link library;
You only need to ensure that you have the correct .LIB file on the developer's computer, and you do not need to consider the existence and version of the .LIB file on the user's computer when distributing the program in binary form, which can avoid problems such as DLL hell.
Disadvantages:
The executable file generated using static linking is relatively large and contains the same common code, causing waste;

Dynamic link

advantage:
Save more memory and reduce page swapping;
The DLL file is independent of the EXE file. As long as the output interface is unchanged (name, parameters, return value types, and calling conventions are unchanged), replacing the DLL file will not have any impact on the EXE file, thus greatly improving maintainability and Scalability
Programs written in different programming languages can call the same DLL function as long as they follow the function calling convention;
It is suitable for large-scale software development, which makes the development process independent and coupled, and facilitates development and testing between different developers and development organizations.
Disadvantages:
Applications that use dynamic link libraries are not self-contained, and the DLL modules they depend on must also exist. If you use dynamic linking at load time and the DLL does not exist when the program starts, the system will terminate the program and give an error message. With dynamic linking at runtime, the system will not terminate, but because the export function in the DLL is not available, the program will fail to load; it is slower than static linking. When a module is updated, if the new module is not compatible with the old module, all software that requires the module to run will be torn off. This was common in early Windows. [1]
Dynamic link
page
Dynamic pages: Contained? , Or those ending in asp, php, jsp, aspx are dynamic. Dynamic pages can be updated and managed by the website background management system. Dynamic pages do not really exist in the server. Accessing dynamic pages requires Databases, dynamic pages are dynamically linked, publishing company products, communicating, blogging, online surveys, etc. These are some of the functions of dynamic websites.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?