Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Direct binding

From Wikipedia, the free encyclopedia
Feature of linker and dynamic linker on Solaris

Direct binding is a feature of thelinker anddynamic linker onSolaris andOpenSolaris. It provides a method to allow libraries to directly bind symbols to other libraries, rather than weakly bind to them and leave the dynamic linker to figure out which library contains the symbol.

Theory

[edit]

When linking a shared library or dynamic linked executable, the linker normally populates thesymbol table for that library with all required symbols. It adds symbols in the current object with their offset, and leaves undefined symbols in the object unresolved. Unresolved symbols must still be known at link time, but the linker is passed shared libraries to link with and, when it finds a symbol in another library, it places a note in the output library indicating that it depends on these other shared libraries.

This kind of weak linking forces the dynamic linker to resolve which library contains which symbol when the executable is run. The dynamic linker on Linux, for example, reads through the DT_NEEDED section of anELF object and loads needed libraries; but isn't told where required symbols are. For this, it must iterate through each unresolved symbol in the object, and for each of these, iterate through each loaded library, checking until it finds a matching symbol. This can be time consuming.

Direct linking works around this problem by storing an equivalent list of pointers to DT_NEEDED entries in a separate ELF section. Each pointer corresponds to a symbol in the object; thus, these pointers create a relation between a symbol and a DT_NEEDED entry. This allows the linker to locate the library specified by a particular DT_NEEDED entry and check only its symbol table for each symbol, rather than iterate through potentially every library for every symbol.

References

[edit]

External links

[edit]


Technologies
OpenSolaris,
illumos
Stub icon

ThisUnix-related article is astub. You can help Wikipedia byexpanding it.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Direct_binding&oldid=1085057693"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp