linker - Virtual/Logical Memory and Program relocation -


virtual memory along logical memory helps make sure programs not corrupt each others data.

program relocation similar thing of making sure multiple programs not corrupt each other.relocation modifies object program can loaded @ new, alternate address.

how virtual memory, logical memory , program relocation related ? similar ? if same/similar, why need program relocation ?

relocatable programs, or said way position-independent code, traditionally used in 2 circumstances:

  • systems without virtual memory (or basic virtual memory, e.g. classic macos), code
  • for dynamic libraries, on systems virtual memory, given dynamic library find lodaded on address not preferred 1 if other code @ space in address space of host program.

however, today main executable programs on systems virtual memory tend position-independent (e.g. pie* build flag on mac os x) can loaded @ randomized address protect against exploits, e.g. using rop**.

* position independent executable
** return-oriented programming


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -