4 ms·
The word "dynamic" in the grandparent post refers to dynamically relocatable object files, i.e. all the memory references in the binary are written as relative
by jey 12y ago
The word "dynamic" in the grandparent post refers to dynamically relocatable object files, i.e. all the memory references in the binary are written as relative offsets so that the binary doesn't assume anything about what address it will have within the process when it gets loaded. Concretely, this means the difference between "JMP 0xDEADBEEF" versus "JMP (special_register)+0xBEEF" so that the .so or .dll file doesn't assume it'll get loaded at 0xDEAD0000.
For a less confusing explanation, see https://en.wikipedia.org/wiki/Position-independent_code https://en.wikipedia.org/wiki/Position-independent_code
(Also: no, it's not really implemented by using one offset register for each .so file in the process.)