Kernel Load Error
Posted: Fri Jan 25, 2013 12:10 am
Long-time reader, first-time poster.
I've been working on the bootloader portion of a hobby OS on and off for some time now. I just recently switched testing from VirtualBox to QEMU, and have finally started making some more progress, however a new issue has me stymied.
My entrypoint address (confirmed using my bootloader's PrintHex64 function, x86_64-elf-readelf, and hexdump) is 0x30081. However, the actual address is offset 0x81 into the .text section (when loaded, starts at address 0x300b0). As a hack, I changed the linkscript to compensate (and flogged myself for doing so), but I was wondering if I am either not supposed to load the program headers, or compensate for them by loading at a different address.
Regardless, I can now execute code in C, which I suspect will greatly accelerate development. Seeing that "Hello, ", even if it's not quite what I meant to print (I know what the problem is and have fixed it), was magical.
I've been working on the bootloader portion of a hobby OS on and off for some time now. I just recently switched testing from VirtualBox to QEMU, and have finally started making some more progress, however a new issue has me stymied.
My entrypoint address (confirmed using my bootloader's PrintHex64 function, x86_64-elf-readelf, and hexdump) is 0x30081. However, the actual address is offset 0x81 into the .text section (when loaded, starts at address 0x300b0). As a hack, I changed the linkscript to compensate (and flogged myself for doing so), but I was wondering if I am either not supposed to load the program headers, or compensate for them by loading at a different address.
Regardless, I can now execute code in C, which I suspect will greatly accelerate development. Seeing that "Hello, ", even if it's not quite what I meant to print (I know what the problem is and have fixed it), was magical.