I am very new to kernel or system programming,
I have couple of questions related to virtual memory. Mostly related to static vs run time, [i.e. ELF and loading/Linking etc], Specific to linux-x86.
My understandings might be completely wrong...
I am aware of virtual memory and it's split 1G/3G. where process can not access address above PAGE_OFFSET in user mode - PAGE_OFFSET is virtual address.
At Static time ELF defines process Virtual space?
If ELF defines virtual address space then does ELF also defines kernel virtual address space? How? [ I assume kernel virtual address space is dynamically mapped at run time?]
If kernel address space is mapped to process address space then why doesn't process size(virtual) includes kernel size also?
- When and How this kernel address space is mapped/linked? Like , In case of shared library the particular file is pointed by vm struct etc..
- Is it when code flow hits system call? For example.
Does executable size determines process size (virtual) completely? in what context sizes differ or they are completely different.
Any article that explains overall flow?
Compile --> link/load --> virtual memory structure (kernel address space/shared objects etc)
I know its very vast but explanation on overall flow will work.
Does kernel use virtual address only for user processes
) are asked many times before. – Tsyvarev