Code: Select all
ld: i386:x86-64 architecture of input file `bootstrap.o' is incompatible with i386 output
ld: i386:x86-64 architecture of input file `kernel.o' is incompatible with i386 output
Code: Select all
OUTPUT_FORMAT(elf64-x86-64)
ENTRY(bootstrap)
SECTIONS{
. = 0x00100000;
KSTART = .;
.bootstrap :{
bootstrap.o(.text)
}
END_BOOTSTRAP =.;
.text :{
*(.text)
}
END_TEXT =.;
.rodata ALIGN (0x1000) : {
*(.rodata)
}
END_RODATA =.;
.data ALIGN (0x1000) : {
*(.data)
}
END_DATA = .;
.bss : {
sbss = .;
*(COMMON)
*(.bss)
ebss = .;
}
END_BSS =.;
KERNEL_END = .;
}
When I compiling I am also using nasm's elf64 and gcc's -m64 options, so can somebody please explain what I am misunderstanding here?