Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm following http://wiki.osdev.org/Kernel_Debugging# ... _with_Qemu and I think the problem might be that my kernel isn't an elf file but I'm not sure how to make it an elf file or extract the symbols from this binary file. What am I doing wrong?
lists the available formats and the .ld linker script has an OUTPUT_FORMAT property which can be changed to elf32-i386 and then the symbols load just fine!
I'm following http://wiki.osdev.org/Kernel_Debugging# ... _with_Qemu and I think the problem might be that my kernel isn't an elf file but I'm not sure how to make it an elf file or extract the symbols from this binary file. What am I doing wrong?
You must make sure that GDB understands the object format for your target platform. You can simply compile GDB from sources to get one specific for your target platform by doing the same as when you compiled your cross compiler (by adding the "--target" flag to configure).
EDIT:
therll wrote:lists the available formats and the .ld linker script has an OUTPUT_FORMAT property which can be changed to elf32-i386 and then the symbols load just fine!
I don't think that you really want that. You made a cross-compiler that compiles binaries for i686, and now you're linking them as i386? That's why you should make a cross-gdb (as described above), because it is able to read your target platforms object format.