View mode: basic / threaded / horizontal-split · Log in · Help
June 18, 2005
Flat Binary Generation
Is there a way to generate flat binaries with the current D compilers? I 
would like to use D to write the kernel for my operating system but I 
need to know if there is a way to get it to make flats or if I will have 
to write my own compiler for it to work.

Thanks,
-Joshua Cearley
June 18, 2005
Re: Flat Binary Generation
Hi,
This may not be an answer to your question directly, but I feel that 
maybe this can be helpful to you anyway.

I have been experimenting with D kernel programming too.
As far as I understand, DMD is a 32bit, protected mode, flat memory 
model compiler.
If you intend your kernel to be so too, then you can simply link D 
generated object files with your assembler glue code, and boot it with 
grub or something. If you want to build a kernel with segmentation, i 
think it's not possible in D.

Although I'm quite a rookie in kernel programming, assembler low level 
programming and even D itself, I _have_ managed to build, compile, and 
run some of the tutorial kernels over at www.osdever.net by using D code 
(DMD) only.

There are also kernel projects that have been discussed on this 
newsgroup before (help me with a name someone?)

So what i'm saying is that you currently _can_ build a kernel in D quite 
easily. For any advanced stuff i am not experienced enough to comment 
on. Perhaps some of the heavy weight D guys can.

Hope this helps,
Kevin

Joshua Cearley wrote:
> Is there a way to generate flat binaries with the current D compilers? I 
> would like to use D to write the kernel for my operating system but I 
> need to know if there is a way to get it to make flats or if I will have 
> to write my own compiler for it to work.
> 
> Thanks,
> -Joshua Cearley
Top | Discussion index | About this forum | D home