I have a couple of doubts about how the kernel is loaded into memory. Upon inspecting /proc/kallsyms
I'm able to find the address of various symbols in the kernel.
$ cat /proc/kallsyms | head -n 10
00000000 t __vectors_start
80008240 T asm_do_IRQ
80008240 T _stext
80008240 T __exception_text_start
80008244 T do_undefinstr
80008408 T do_IPI
8000840c T do_DataAbort
800084a8 T do_PrefetchAbort
80008544 t gic_handle_irq
800085a0 T secondary_startup
- Is there any way I can find the base address at which the kernel is loaded?
- In userspace, suppose I use a libc with say the
puts
function at an offset of 0x200. When loaded into memory at say the address0x8048000
, I would be able to find the resolvedputs
at0x8048000 + 0x200
. Would the same hold for the kernel? i.e. is the kernel image loaded up into memory as 1 contiguous.text
section?