I found some now-dead pascal operating systems scattered around the internet, wrote some ideas down, but currently I'm stuck, because I cannot link the compiled stuff listed in the Pascal Bare Bones wiki article.
Code: Select all
[major@localhost Build 2]$ ld --gc-sections -s -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
ld: i386 architecture of input file `stub.o' is incompatible with i386:x86-64 output
[major@localhost Build 2]$ file stub.o
stub.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
[major@localhost Build 2]$
[major@localhost Build 2]$ which i386-elf-ld
/home/major/opt/cross/bin/i386-elf-ld
[major@localhost Build 2]$ i386-elf-ld --gc-sections -s -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
kernel.o: file not recognized: File format not recognized
[major@localhost Build 2]$
[major@localhost Build 2]$ file kernel.o
kernel.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
[major@localhost Build 2]$ x86_64-elf-ld --gc-sections -s -Tlinker.script -o kernel.obj stub.o kernel.o multiboot.o system.o console.o
x86_64-elf-ld: i386 architecture of input file `stub.o' is incompatible with i386:x86-64 output
[major@localhost Build 2]$
Thanks in advance!
EDIT: I found the solution to this problem, but I've found the next one. I have to use "nasm -f elf64" insted of "nasm -f elf" but for some reason when I boot the iso, grub loads successfully, but it says to my shiny new os that it is not multiboot compliant. Maybe GRUB cannot load the kernel.obj file as it is elf64 too?


