Skip to content

Instantly share code, notes, and snippets.

@Ragmaanir
Created November 20, 2015 21:49
Show Gist options
  • Save Ragmaanir/17a6b49ad6c1725aafa1 to your computer and use it in GitHub Desktop.
Save Ragmaanir/17a6b49ad6c1725aafa1 to your computer and use it in GitHub Desktop.
rm -r output
mkdir -p output/objects
mkdir -p output/image/boot/grub
ldc2 -de -enable-asserts -enable-color -enable-preconditions -disable-red-zone -enable-contracts -nogc -w -m64 -boundscheck=off -relocation-model=pic -c source/kernel.d -c source/types.d -c source/string.d -c source/vga_terminal.d -odoutput/objects
nasm -f elf64 source/boot_header.asm -o output/objects/boot_header.o &&
nasm -f elf64 source/boot.asm -o output/objects/boot.o &&
ld -nostdlib -nodefaultlibs -n -o output/image/boot/kernel.bin -T source/linker.ld output/objects/boot_header.o output/objects/boot.o output/objects/kernel.o output/objects/string.o output/objects/vga_terminal.o output/objects/types.o &&
cp source/grub.cfg output/image/boot/grub/ &&
grub-mkrescue -o output/image.iso output/image
output/objects/kernel.o: In function `ldc.dso_ctor.6kernel':
source/kernel.d:(.text.ldc.dso_ctor.6kernel+0x52): undefined reference to `_d_dso_registry'
output/objects/kernel.o: In function `ldc.dso_dtor.6kernel':
source/kernel.d:(.text.ldc.dso_dtor.6kernel+0x52): undefined reference to `_d_dso_registry'
output/objects/kernel.o:(.data.rel.ro._D11TypeInfo_xk6__initZ[_D11TypeInfo_xk6__initZ]+0x0): undefined reference to `_D14TypeInfo_Const6__vtblZ'
output/objects/kernel.o:(.data.rel.ro._D11TypeInfo_xk6__initZ[_D11TypeInfo_xk6__initZ]+0x10): undefined reference to `_D10TypeInfo_k6__initZ'
output/objects/kernel.o:(.data.rel.ro._D13TypeInfo_xAya6__initZ[_D13TypeInfo_xAya6__initZ]+0x0): undefined reference to `_D14TypeInfo_Const6__vtblZ'
output/objects/kernel.o:(.data.rel.ro._D13TypeInfo_xAya6__initZ[_D13TypeInfo_xAya6__initZ]+0x10): undefined reference to `_D12TypeInfo_Aya6__initZ'
output/objects/string.o: In function `ldc.dso_ctor.6string':
source/string.d:(.text.ldc.dso_ctor.6string+0x52): undefined reference to `_d_dso_registry'
output/objects/string.o: In function `ldc.dso_dtor.6string':
source/string.d:(.text.ldc.dso_dtor.6string+0x52): undefined reference to `_d_dso_registry'
output/objects/string.o:(.data.rel.ro._D6string6String6__vtblZ+0x8): undefined reference to `_D6object6Object8toStringMFZAya'
output/objects/string.o:(.data.rel.ro._D6string6String6__vtblZ+0x10): undefined reference to `_D6object6Object6toHashMFNbNeZm'
output/objects/string.o:(.data.rel.ro._D6string6String6__vtblZ+0x18): undefined reference to `_D6object6Object5opCmpMFC6ObjectZi'
output/objects/string.o:(.data.rel.ro._D6string6String6__vtblZ+0x20): undefined reference to `_D6object6Object8opEqualsMFC6ObjectZb'
output/objects/string.o:(.data.rel._D6string6String7__ClassZ+0x0): undefined reference to `_D14TypeInfo_Class6__vtblZ'
output/objects/string.o:(.data.rel._D6string6String7__ClassZ+0x50): undefined reference to `_D6Object7__ClassZ'
output/objects/vga_terminal.o: In function `_D12vga_terminal11VGATerminal5printMFxPaZv':
source/vga_terminal.d:(.text._D12vga_terminal11VGATerminal5printMFxPaZv+0x20): undefined reference to `_D9invariant12_d_invariantFC6ObjectZv'
source/vga_terminal.d:(.text._D12vga_terminal11VGATerminal5printMFxPaZv+0x4d): undefined reference to `_d_assert_msg'
output/objects/vga_terminal.o: In function `ldc.dso_ctor.12vga_terminal':
source/vga_terminal.d:(.text.ldc.dso_ctor.12vga_terminal+0x52): undefined reference to `_d_dso_registry'
output/objects/vga_terminal.o: In function `ldc.dso_dtor.12vga_terminal':
source/vga_terminal.d:(.text.ldc.dso_dtor.12vga_terminal+0x52): undefined reference to `_d_dso_registry'
output/objects/vga_terminal.o:(.data.rel.ro._D12vga_terminal11VGATerminal6__vtblZ+0x8): undefined reference to `_D6object6Object8toStringMFZAya'
output/objects/vga_terminal.o:(.data.rel.ro._D12vga_terminal11VGATerminal6__vtblZ+0x10): undefined reference to `_D6object6Object6toHashMFNbNeZm'
output/objects/vga_terminal.o:(.data.rel.ro._D12vga_terminal11VGATerminal6__vtblZ+0x18): undefined reference to `_D6object6Object5opCmpMFC6ObjectZi'
output/objects/vga_terminal.o:(.data.rel.ro._D12vga_terminal11VGATerminal6__vtblZ+0x20): undefined reference to `_D6object6Object8opEqualsMFC6ObjectZb'
output/objects/vga_terminal.o:(.data.rel._D12vga_terminal11VGATerminal7__ClassZ+0x0): undefined reference to `_D14TypeInfo_Class6__vtblZ'
output/objects/vga_terminal.o:(.data.rel._D12vga_terminal11VGATerminal7__ClassZ+0x50): undefined reference to `_D6Object7__ClassZ'
output/objects/types.o: In function `ldc.dso_ctor.5types':
source/types.d:(.text.ldc.dso_ctor.5types+0x52): undefined reference to `_d_dso_registry'
output/objects/types.o: In function `ldc.dso_dtor.5types':
source/types.d:(.text.ldc.dso_dtor.5types+0x52): undefined reference to `_d_dso_registry'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment