Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does the dynamic linker work?

Dynamic Linker
0
Posted

How does the dynamic linker work?

0

The dynamic linker /shlib/ld-bsdi.so is responsible for assembling the full, executable version of a program in memory, using pieces called dynamically linked shared libraries. Here is a quick overview of dynamic linking. When you build a program for dynamic linking, the compiler cc and static linker ld put special data structures into the ELF file. These include: • A segment containing the name of the dynamic linker. • A dynamic symbol table that contains the names and descriptions of symbols of interest to the dynamic linker. These symbols include all of the symbols that ld couldn’t locate in the program. If you tell ld which shared libraries you need, it will search those shared libraries for matches with the program’s own symbols, and it will allow the program’s definitions to take precedence. A hash table is included to allow the dynamic linker to quickly look up symbols by name. • One or more relocation tables containing data structures that describe how to change pointers in the

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.