Mail Archives: djgpp/2002/06/18/06:30:05
Dylan (dylanmarsh AT yahoo DOT com) wrote:
: Ive been playing around with grub and a small kernel using djgpp and
: its AT&T syntax style assembly language. gcc version is 2.953, ld
: version is 2.11.2.
: nasm -o start.o -f elf start.asm
: gcc -o kernel.o -c kernel.c
: gcc -Wall -o asm.o -c asm.S
DJGPP's gcc is generating COFF.
: ld-elf -T kernel.ls asm.o start.o kernel.o -o kernel // <<< problem
: line
This looks like an ELF linker.
: the nasm file compiles and links and so does the C file. The asm.S
No it doesn't. It compiles fine. Linking is what you're attempting in
the line starting with "ld-elf".
: file compiles but doesn't link it says it can't recognize the file.
: Do I need a different linker?
No. If you mean to use ELF (ld-elf) you need a differently compiled
gcc.
Yes. Use ld which comes with DJGPP and change your nasm line from "-f
elf" to "-f coff".
Right,
MartinS
- Raw text -