Problems when linking kernel to elf
Posted: Mon Aug 26, 2002 9:47 am
I have a .asm-file and a .c-file...
I assemble the .asm-file like this:
nasm -f elf boot.asm
Ok, I also have a linker file (link.ld).
First line is:
OUPUT_FORMAT("elf32-i386")
Ok, when I want to link it, ld sais:
"ld: gipp: Not enough room for program headers, try linking with -N
ld: final link failed: Bad value"
When I change the nasm command line to:
nasm -f aout ....
and change the linker file to
OUTPUT_FORMAT("binary")
everything works fine. But GRUB cannot load this...
So whats wrong with elf?
I assemble the .asm-file like this:
nasm -f elf boot.asm
Ok, I also have a linker file (link.ld).
First line is:
OUPUT_FORMAT("elf32-i386")
Ok, when I want to link it, ld sais:
"ld: gipp: Not enough room for program headers, try linking with -N
ld: final link failed: Bad value"
When I change the nasm command line to:
nasm -f aout ....
and change the linker file to
OUTPUT_FORMAT("binary")
everything works fine. But GRUB cannot load this...
So whats wrong with elf?