Doesn't the loaded code have to be patched for relocations?
It does, so not 100% is reused. The patched parts are in different sections though, so the entire .text (code) section ends up being reused.
Not on modern archs that provide decent support for PIE (position independent executables).
Not if it's position-independent.
It does, so not 100% is reused. The patched parts are in different sections though, so the entire .text (code) section ends up being reused.