Relationship Between. plt. rel. dyn. rel. plt. got. got. plt in the elf File.. plt. rel. dyn

Source: Internet
Author: User

Relationship Between. plt. rel. dyn. rel. plt. got. got. plt in the elf File.. plt. rel. dyn

. Plt is a stepping stone that stores the offset of a symbol in the relocation table (used to find a symbol for the first time) and the corresponding address of. got. plt.

. Rel. dyn saves the start address of the. got segment, which has not been proved

. Rel. plt stores information about the relocated table.

. Got is said to have saved the offset of each symbol of the elf file, that is, do not dynamically link it. It is not proved

. Got. plt saves the Relocation Address.

For example, if printf is a relocation symbol and needs to be connected to the symbol, the process is as follows:

Main function call. an address in the plt segment. The first sentence here is to transfer. got. the printf address saved in plt. If this is the first time, the saved address is. in plt, the next sentence is pushed into this symbol. rel. the offset of the relocation table in plt. Then, the ld program finds the address based on the information in the relocation table and saves it to the address pointed to by the relocation table. This address is actually. got. an address of the plt segment.

The address saved in. got. plt can be obtained directly during the second call.

In short, this design is very complete and relevant, 6666666

Related Article

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.