2 ms·
There is another thing that slows down the symbol resolution: the symbols are not scoped per library or soname, they are global and so every symbol is searched
by vetinari 10y ago
There is another thing that slows down the symbol resolution: the symbols are not scoped per library or soname, they are global and so every symbol is searched in every linked library. Link few C++ libraries, the symbol count explodes and the runtime linking slows downs. Large C++ apps, like OpenOffice.org, used to have a problem with this.
The I/O may or may not be a bottleneck. The libraries are being mmaped and if some other process is already using them, chances are, that the interesting parts are already paged in.
- brucedawson 10y agoWhenever I hear about how loaders resolve symbols on Linux I am amazed that it works at all, and that it runs reasonably fast. The loader on Windows has a much simpler job - it imports specific symbols from specific DLLs. In many cases the importing is done by ordinal instead of by name, to make it even faster. I'm used to the Windows system so I don't miss the extra functionality that the Linux loader provides - in fact I find it scary.