Initialised data after end of kernel that shouldn't be there
Posted: Mon Mar 09, 2015 10:06 am
Hi,
In my kernel linker script I have a symbol to easily point to the last address used by the kernel:
When my kernel runs this turns out to be address 0x00302074. However, upon examining the memory after this location, about 4KiB later there is some data that I have no idea where it comes from. I'm really confused why there is data after the kernel so I was wondering if anyone had any ideas what that could be.
This is some data around 4KiB after the address:
Note I'm using qemu, so unitialised addresses read 0 instead of garbage data. Could it be data from qemu or GRUB's multiboot data? All I'm doing in the kernel is loading a GDT with statically defined structs and utilising a simple kprintf() function. All the static data is supposedly located before kernel_end, no?
In my kernel linker script I have a symbol to easily point to the last address used by the kernel:
Code: Select all
...
.bss ALIGN (0x1000) :
{
sbss = .;
*(COMMON)
*(.bss)
*(.gnu.linkonce.b*)
ebss = .;
}
kernel_end = .;
}
This is some data around 4KiB after the address:
Note I'm using qemu, so unitialised addresses read 0 instead of garbage data. Could it be data from qemu or GRUB's multiboot data? All I'm doing in the kernel is loading a GDT with statically defined structs and utilising a simple kprintf() function. All the static data is supposedly located before kernel_end, no?