|
|
|
|
|
by BugBrother
4499 days ago
|
|
>>the linking process is a complex task, especially if it's to be performed with any efficiency. I'm no kernel hacker, but doesn't that make the GP argument better? It would be almost like static linking? If code is compiled against a shared lib which always will be at the same address in virtual memory, a linking setup could be cached. (And redone if there is a new version of the library, of course.) (I realize that caching this symbol table won't be a totally trivial change.) |
|
Nope. Dynamic linking is done each time the program is loaded - the kernel calls out to the dynamic linker to open shared libraries, resolve symbols, create jump tables & the like. Static linking is done once (at compile/link time). When you execute a statically compiled library, the kernel just loads the text, data & bss into memory and more or less starts executing main(). Much, much simpler, although you lose the ability to do things like ASLR.