d bare bones

eles eles at eles.com
Fri Sep 6 02:35:07 PDT 2013


I am starting a new thread, since I am afraid that the other one 
will become too cluttered with issues...

It is about this OS kernel:

http://wiki.osdev.org/D_Bare_Bones

I tried to duplicate the steps. However, on my x86_64 machine, 
the actual commands that I had to use are:

$nasm -f elf -o start.o start.asm
$gdc -m32 -nostdlib -nodefaultlibs -g -c -o kernel.main.o 
kernel.main.d
$LDEMULATION="elf_i386" ld -T linker.ld -o kernel.bin start.o 
kernel.main.o

(in order to emulate the 32-bits architecture).

The first command went just fine, the second command emitted 
warnings:

kernel.main.d:13: Deprecation: volatile statements deprecated; 
use synchronized statements instead
kernel.main.d:16: Deprecation: volatile statements deprecated; 
use synchronized statements instead
kernel.main.d:18: Deprecation: volatile statements deprecated; 
use synchronized statements instead

while the third one was merciless:

kernel.main.o: In function `main':
/home/user/bootloader/kernel.main.d:12: undefined reference to 
`_d_criticalenter'
/home/user/bootloader/kernel.main.d:12: undefined reference to 
`_d_criticalexit'
/home/user/bootloader/kernel.main.d:15: undefined reference to 
`_d_criticalenter'
/home/user/bootloader/kernel.main.d:15: undefined reference to 
`_d_criticalexit'
/home/user/bootloader/kernel.main.d:16: undefined reference to 
`_d_criticalenter'
/home/user/bootloader/kernel.main.d:16: undefined reference to 
`_d_criticalexit'
kernel.main.o: In function 
`kernel.main._D6kernel4main9__modinitFZv':
/home/user/bootloader/kernel.main.d:18: undefined reference to 
`_Dmodule_ref'
/home/user/bootloader/kernel.main.d:18: undefined reference to 
`_Dmodule_ref'

Any clues? It is because of the deprecated volatile statements?


More information about the D.gnu mailing list