-
Notifications
You must be signed in to change notification settings - Fork 0
Issues I have faced
An issue I had with Higher-half kernel was that the generated object file kernel.elf had multiple different text sections in its object headers (objdump -h kernel.elf). The issue seemed to go away depending on the size of the string I was declaring inside my kmain C-code. If the string was out of some length limit I still don't know, the output would have sections such as ".text.__x86.get_pc_thunk.ax" which did NOT get mapped to physical memory in my linker file. These were code sections, so by specifying the .text section to contain these too, it worked. So if you have similar issues, try:
change
.text ALIGN (0X1000): AT(ADDR(.text) - 0xC0000000) { *(.text) (.rodata) }
to
.text ALIGN (0X1000): AT(ADDR(.text) - 0xC0000000) { *(.text) (.rodata) }