This is more like a knowledge question than actual implementation. I was wondering if any kernel function can have different virtual addresses after the system starts. My understanding of compilation for executable is virtual addresses are assigned for its binary but virtual to physical is done at run time by os.(paging. I know that stuff. So, no need 2 explain) But in case of kernel functions, I see them having different virtual addresses when every time I restart the system. 1. How are kernel functions mapped in the address range? 2. Can they be mapped to different virtual addresses at run time. (I wonder how it is possible) 3. How is the address mapping for dlls? Are they given a virtual address at compilation or assigned a relative address at run time? (I think that's how it is done.) 4. Is there any way to find if any kernel virtual address is pinned to physical memory.
Thanks