My kernel compiles okay, but I get the infernal "error 13: invalid or unsupported executable"
So I took a look at the hex, and in big endian the multi-boot header is at the very end of the executable. Don't know if that's good. I'm using a cross compiler on my Mac, and I don't know how to find the location of the binary where something starts in my hex editor (HexFiend). Anyway, just before the multiboot starts, there's some crap about the netwide assembler being built on an apple computer. In the binary.
Is my binary @$$-backwards or just clogged by a bad assembler?
Please comment if you want the binary to look at it in your own hex editor.
...I need to learn how to get more info out of hex (any help would be greatly appreciated! )
EDIT: Also, there are a hell of a lot of zero's inbetween each section of the binary (the contents of the object files)
Thanks,
Matt
grub 13 error and crazy hex in my kernel
grub 13 error and crazy hex in my kernel
You are a computer.
~ MCS ~
~ MCS ~
-
- Member
- Posts: 89
- Joined: Tue Feb 26, 2008 10:47 am
- Location: Sweden
Re: grub 13 error and crazy hex in my kernel
It sounds like you managed to get your multiboot header into the .rodata section of your executable (assuming it's an ELF file).
Try adding or something right before your multiboot header declaration.
It's all in the wiki. http://wiki.osdev.org/Grub_Error_13
Edit: Generally, I think you get more information from objdump than from a hex editor. Some people disagree.
Try adding
Code: Select all
[section .text]
It's all in the wiki. http://wiki.osdev.org/Grub_Error_13
Edit: Generally, I think you get more information from objdump than from a hex editor. Some people disagree.
Re: grub 13 error and crazy hex in my kernel
I'm on mac and wih Xcode comes an objdump work alike called otool, but apples got it so messed up that you have to have a compiled executable in mach-o format. Anyway, I will try this when I get home! Thank you.
You are a computer.
~ MCS ~
~ MCS ~
-
- Member
- Posts: 89
- Joined: Tue Feb 26, 2008 10:47 am
- Location: Sweden
Re: grub 13 error and crazy hex in my kernel
Objdump is included in binutils and is probably installed with your cross compiler environment.
Re: grub 13 error and crazy hex in my kernel
Okay! I didn't know that, thanks!
You are a computer.
~ MCS ~
~ MCS ~