1. Address relocation: The linkerProgramTo bind and assign the corresponding address, the loader completes the final relocation step and assigns the actual address
2. From the original article:
With the emergence of hardware relocation and virtual memory, every program can have the whole address space again, so
The connectors and loaders become less complex. Because hardware (rather than software) can be relocated during any loading
The program can be linked by loading to a fixed address. However, computing with hardware relocation
The machine often runs more than one program, and multiple copies of the same program are often run. When a computer runs a program
When multiple instances, some parts of the program are the same in all running instances (especially executableCode),
The other parts are exclusive to each instance. If the unchanged part can be separated from the changed part
The system can use only one copy of the unchanged part, saving considerable storage space. Compiler and assembler can
Modified to create the target code in multiple segments, assign one segment to the read-only code, and assign other segments to other writeable data segments.
The linker must be able to merge all segments of the same type so that all code of the linked program is placed in
One place, and all the data is placed in another place. Because the address is still allocated at the link
The address binding time cannot be delayed, but more work is delayed when the linker assigns an address for all segments.
This section is a bit like what we talked about in the design pattern. Find out where the application may need to change and separate them. Changes in some parts of the system will not affect other parts;
At the same time, because cache is commonly used in computers, cache is faster than memory calling for repeated code, so it can speed up program running.