Invalid or unsupported executable format from GRUB
Posted: Thu May 06, 2010 6:27 pm
when i try to load my os, this msg appear.
i didnt find out any answer about it.
this stuff maybe help:
objdump -h ./bin/kernel.bin
./bin/kernel.bin: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00003ca2 00100000 00100000 00001000 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 00000e06 00104000 00104000 00005000 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 00000320 00105000 00105000 00006000 2**5
CONTENTS, ALLOC, LOAD, DATA
3 .bss 0000bac8 00105320 00105320 00006320 2**5
ALLOC
4 .comment 00000023 00000000 00000000 00006320 2**0
CONTENTS, READONLY
compile:
cd ./bin
rm -rf *
nasm -f elf ../src/libasm.asm -o libasm.o
nasm -f elf ../src/kstart.asm -o kstart.o
nasm -f elf ../src/loader.asm -o kstart.o
gcc -c ../src/kernel.c -o kernel.o -fno-builtin -fno-stack-protector
gcc -c -fno-stack-protector ../src/libc.c -o libc.o -fno-builtin
gcc -c ../src/buffer.c -o buffer.o -fno-builtin
gcc -c ../src/bufferTeclado.c -o bufferTeclado.o -fno-builtin
gcc -c ../src/initMouse.c -o initMouse.o -fno-builtin
gcc -c ../src/mouse.c -o mouse.o -fno-builtin
gcc -c ../src/video.c -o video.o -fno-builtin
gcc -c ../src/protpant.c -o protpant.o -fno-builtin
gcc -c ../src/paginacion.c -o paginacion.o -fno-builtin
gcc -c ../src/string.c -o string.o -fno-builtin
gcc -c ../src/sched.c -o sched.o -fno-builtin -fno-stack-protector
gcc -c ../src/malloc.c -o malloc.o -fno-builtin
ld -T ../src/link.ld -o kernel.bin kernel.o kstart.o libc.o libasm.o bufferTeclado.o buffer.o video.o initMouse.o mouse.o protpant.o paginacion.o string.o sched.o malloc.o
thx.
i didnt find out any answer about it.
this stuff maybe help:
objdump -h ./bin/kernel.bin
./bin/kernel.bin: file format elf32-i386
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00003ca2 00100000 00100000 00001000 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 00000e06 00104000 00104000 00005000 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 00000320 00105000 00105000 00006000 2**5
CONTENTS, ALLOC, LOAD, DATA
3 .bss 0000bac8 00105320 00105320 00006320 2**5
ALLOC
4 .comment 00000023 00000000 00000000 00006320 2**0
CONTENTS, READONLY
compile:
cd ./bin
rm -rf *
nasm -f elf ../src/libasm.asm -o libasm.o
nasm -f elf ../src/kstart.asm -o kstart.o
nasm -f elf ../src/loader.asm -o kstart.o
gcc -c ../src/kernel.c -o kernel.o -fno-builtin -fno-stack-protector
gcc -c -fno-stack-protector ../src/libc.c -o libc.o -fno-builtin
gcc -c ../src/buffer.c -o buffer.o -fno-builtin
gcc -c ../src/bufferTeclado.c -o bufferTeclado.o -fno-builtin
gcc -c ../src/initMouse.c -o initMouse.o -fno-builtin
gcc -c ../src/mouse.c -o mouse.o -fno-builtin
gcc -c ../src/video.c -o video.o -fno-builtin
gcc -c ../src/protpant.c -o protpant.o -fno-builtin
gcc -c ../src/paginacion.c -o paginacion.o -fno-builtin
gcc -c ../src/string.c -o string.o -fno-builtin
gcc -c ../src/sched.c -o sched.o -fno-builtin -fno-stack-protector
gcc -c ../src/malloc.c -o malloc.o -fno-builtin
ld -T ../src/link.ld -o kernel.bin kernel.o kstart.o libc.o libasm.o bufferTeclado.o buffer.o video.o initMouse.o mouse.o protpant.o paginacion.o string.o sched.o malloc.o
thx.