About the linker and loader (read the linker and loader)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.