#include
directives by including the files called file inclusion and all the #define
directives using macro expansion.Static link
Before the program is loaded into memory and running, all its target modules and required library functions have been linked and assembled into a complete executable program and will not be split thereafter.
Dynamic link
Link while the program is loaded to generate an executable program. If an external module call occurs, the search, mounting and link of the external target module will be triggered.
Runtime link
During the execution of the program, if it is found that the called module or library function has not been linked, search in memory first to see if the memory is loaded. If it has been loaded, it will be directly linked to the calling program, otherwise the module will be searched for external memory.
Absolute loading
The instruction address in the loading module is the same as the address in its memory. All addresses are absolute addresses.
Relocate loading
Put the loading code module into the physical position of the memory depending on the usage of memory at that time. The relative addresses are used in the module.
Dynamic running loading
In order to improve memory utilization, the program loaded into memory can be replaced on disk and then transferred to memory. The position of the program in memory before and after replacement may be different.
The loading module in the disk uses a logical address, and when the process runs, its loading code module will be loaded into the physical address space. The process of converting logical address into a physical address is called “address relocation”.
Static address relocation
All logical addresses are modified to physical addresses. The address conversion is completed only once before the process is executed.
Dynamic address relocation
The starting address of the program memory is placed in the relocation register. Whenever the CPU refers to the memory address, adds the value of the relocation register before it is sent to memory.
Runtime link address relocation