coff header
Posted: Tue Jan 27, 2004 10:28 pm
i'm trying to write loader for coff-go32 format.
in the linker script i specify 3 sections.but when i read coff header,it shows that there are 4 sections.
here are commands for compiling and linking c and asm files.
here is my linker script.
please tell why it is showing 4 sections and what might be the 4th section.
in the linker script i specify 3 sections.but when i read coff header,it shows that there are 4 sections.
here are commands for compiling and linking c and asm files.
Code: Select all
gcc -c kernel_c.c
NASM -f coff kernel.asm
ld -o k.o -Tlinker.ld kernel.o kernel_c.o
Code: Select all
OUTPUT_FORMAT("coff-go32")
ENTRY(_start)
SECTIONS
{
.text 0x100000 : {
*(.text)
}
.data : {
*(.data)
}
.bss :
{
*(.bss)
}
}