Why can an ELF virtual address be determined before it is mapped to virtual space?

The object file is associated with the creation of the ELF file and its virtual address is determined. For example, the .text virtual address is 0x8048000. When the ELF file is mapped to virtual space, another ELF is already mapped to this address. What should the operating system do? Why an ELF virtual address can be determined before it is mapped to virtual space.

+4
source share
2 answers

Each process gets its own personal virtual address space - the point of its virtuality; it does not have to match where the program is actually located in physical RAM. Thus, there is no conflict of addresses between programs running in different processes. All of them can be mapped to this address, each in its own address space.

+3
source
0

Source: https://habr.com/ru/post/1609883/


All Articles