D - systems programming
- Charles Banas (12/12) Mar 17 2003 i noticed in the DMD documentation that D can be used in systems
- Walter (6/13) Mar 19 2003 That's a feature of the linker. See www.digitalmars.com/ctg/optlink.html
- Charles Banas (9/16) Mar 19 2003 GCC's LD refers to it as "bin" format. i honestly don't want to have to...
- Walter (7/18) Mar 20 2003 go
- Charles Banas (12/23) Mar 20 2003 not so. it's a raw binary without headers. like a 32-bit com file (if
- Roberto Mariottini (9/21) Mar 21 2003 Also Microsoft's should support that, at least for backward
- Charles Banas (8/16) Mar 22 2003 i don't have the experience or skill to write a compiler backend myself....
- Sean L. Palmer (4/8) Mar 21 2003 It's because Microsoft wants to own all the standards.
- Charles Banas (5/13) Mar 22 2003 which is something i'd like to prevent. :)
- Walter (8/17) Mar 21 2003 OMF was the only one used on the PC by probably 50 compilers for about 1...
- Charles Banas (12/34) Mar 22 2003 the thing is, not only is it well-worn, but it's worn-out. those 50
- Mark Evans (4/7) Mar 22 2003 I second the motion. Object formats are a problem with Digital Mars too...
i noticed in the DMD documentation that D can be used in systems programming, but it is only mentioned in the introduction, and never expounded on. for example, i can't find information on setting the start point (as i can with GNU GCC's ld) of an executable, outputting a raw binary at link time, or linking to oject files compiled with a separate assembler. stuff like that. am i just not looking hard enough, forgetting something, or has no one ever tried using DMD in a systems context? if anyone has tried using DMD this way, i'd appreciate knowing about it. :) -- Charles "grey wolf" Banas
Mar 17 2003
"Charles Banas" <greywolf greyfade.net> wrote in message news:oprl7p2ki78ctebf news.digitalmars.com...i noticed in the DMD documentation that D can be used in systems programming, but it is only mentioned in the introduction, and never expounded on. for example, i can't find information on setting the start point (as i can with GNU GCC's ld) of an executable,That's a feature of the linker. See www.digitalmars.com/ctg/optlink.htmloutputting a raw binary at link time,I don't know what you mean by this. The linker outputs an executable in PE format.or linking to oject files compiled with a separate assembler.Easy, just specify the .obj files in the command to DMD.
Mar 19 2003
On Wed, 19 Mar 2003 01:21:06 -0800, Walter <walter digitalmars.com> wrote:That's a feature of the linker. See www.digitalmars.com/ctg/optlink.htmlmy bad. i forgot DMD used that linker.GCC's LD refers to it as "bin" format. i honestly don't want to have to go the extra step of stripping a PE.outputting a raw binary at link time,I don't know what you mean by this. The linker outputs an executable in PE format.i'm just not exactly sure what format(s) it expects for the obj files. that, and i've never heard of OMF. (or, more accurately, i've never seen anything that supports it.) -- Charles "grey wolf" Banasor linking to oject files compiled with a separate assembler.Easy, just specify the .obj files in the command to DMD.
Mar 19 2003
"Charles Banas" <greywolf greyfade.net> wrote in message news:oprma8t3z58ctebf news.digitalmars.com...goGCC's LD refers to it as "bin" format. i honestly don't want to have tooutputting a raw binary at link time,I don't know what you mean by this. The linker outputs an executable in PE format.the extra step of stripping a PE.The LD "bin" format, if for windows32, is likely a PE (portable executable) file.The object file format used by D and the linker is OMF (Object Module Format). It's a standard put out by Intel.i'm just not exactly sure what format(s) it expects for the obj files. that, and i've never heard of OMF. (or, more accurately, i've never seen anything that supports it.)or linking to oject files compiled with a separate assembler.Easy, just specify the .obj files in the command to DMD.
Mar 20 2003
On Thu, 20 Mar 2003 15:27:50 -0800, Walter <walter digitalmars.com> wrote:The LD "bin" format, if for windows32, is likely a PE (portable executable) file.not so. it's a raw binary without headers. like a 32-bit com file (if such a thing exists) without the extra 100-byte header.and the only other two linkers that seem to support it are Intel's and Borland's. i don't have access to Intel's. i never ceases to amaze me when some standards are never used by everyone. since i work on multiple platforms, i need the ability to work with more common object file formats (like elf and coff) and to output a raw 32-bit binary file (with no header, relocation, or segment data) for my project. i guess i'll have to wait for the GCC frontend before i can use D. suck. -- Charles "grey wolf" BanasThe object file format used by D and the linker is OMF (Object Module Format). It's a standard put out by Intel.i'm just not exactly sure what format(s) it expects for the obj files. that, and i've never heard of OMF. (or, more accurately, i've never seen anything that supports it.)or linking to oject files compiled with a separate assembler.Easy, just specify the .obj files in the command to DMD.
Mar 20 2003
Charles Banas wrote:On Thu, 20 Mar 2003 15:27:50 -0800, Walter <walter digitalmars.com> wrote:[...]Also Microsoft's should support that, at least for backward compatibility, since MASM can output also OMF object files. So we have at least 3 multinational companies that uses this standard.The object file format used by D and the linker is OMF (Object Module Format). It's a standard put out by Intel.and the only other two linkers that seem to support it are Intel's and Borland's. i don't have access to Intel's. i never ceases to amaze me when some standards are never used by everyone.since i work on multiple platforms, i need the ability to work with more common object file formats (like elf and coff) and to output a raw 32-bit binary file (with no header, relocation, or segment data) for my project. i guess i'll have to wait for the GCC frontend before i can use D. suck.I think you'll need a _backend_ not a _frontend_. Have you tried the linux D compiler? Or you can write your own backend, since the frontend sources are public. Ciao
Mar 21 2003
On Fri, 21 Mar 2003 09:13:10 +0100, Roberto Mariottini <rmariottini lycosmail.com> wrote:i don't have the experience or skill to write a compiler backend myself. the linux D compiler, as it is, is still too early in the alpha stages to be of any use to me. i'd rather use something more mature like GCC or the existing win32 D compiler than this. even if only for experimentation. -- Charles "grey wolf" Banassince i work on multiple platforms, i need the ability to work with more common object file formats (like elf and coff) and to output a raw 32- bit binary file (with no header, relocation, or segment data) for my project. i guess i'll have to wait for the GCC frontend before i can use D. suck.I think you'll need a _backend_ not a _frontend_. Have you tried the linux D compiler? Or you can write your own backend, since the frontend sources are public.
Mar 22 2003
"Charles Banas" <greywolf greyfade.net> wrote in message news:oprmdipc0b8ctebf news.digitalmars.com...On Thu, 20 Mar 2003 15:27:50 -0800, Walter <walter digitalmars.com> wrote: and the only other two linkers that seem to support it are Intel's and Borland's. i don't have access to Intel's. i never ceases to amaze me when some standards are never used by everyone.It's because Microsoft wants to own all the standards. Sean
Mar 21 2003
On Fri, 21 Mar 2003 10:44:05 -0800, Sean L. Palmer <seanpalmer directvinternet.com> wrote:"Charles Banas" <greywolf greyfade.net> wrote in message news:oprmdipc0b8ctebf news.digitalmars.com...which is something i'd like to prevent. :) -- Charles "grey wolf" BanasOn Thu, 20 Mar 2003 15:27:50 -0800, Walter <walter digitalmars.com> wrote: and the only other two linkers that seem to support it are Intel's and Borland's. i don't have access to Intel's. i never ceases to amaze me when some standards are never used by everyone.It's because Microsoft wants to own all the standards.
Mar 22 2003
"Charles Banas" <greywolf greyfade.net> wrote in message news:oprmdipc0b8ctebf news.digitalmars.com...OMF was the only one used on the PC by probably 50 compilers for about 12 years. It's a pretty well worn standard. The only compilers I know of that supports Microsoft's version of COFF is Microsoft's compilers.The object file format used by D and the linker is OMF (Object Module Format). It's a standard put out by Intel.and the only other two linkers that seem to support it are Intel's and Borland's. i don't have access to Intel's. i never ceases to amaze me when some standards are never used by everyone.since i work on multiple platforms, i need the ability to work with more common object file formats (like elf and coff) and to output a raw 32-bit binary file (with no header, relocation, or segment data) for my project. i guess i'll have to wait for the GCC frontend before i can use D. suck.The PE format is pretty simple, and it shouldn't be too hard to write an EXE2BIN for it, assuming that you've programmed out any references to DLLs, etc.
Mar 21 2003
On Fri, 21 Mar 2003 15:27:24 -0800, Walter <walter digitalmars.com> wrote:"Charles Banas" <greywolf greyfade.net> wrote in message news:oprmdipc0b8ctebf news.digitalmars.com...the thing is, not only is it well-worn, but it's worn-out. those 50 compilers are obsolete and OMF was pretty much replaced by ELF, COFF, et. al. and since i don't even use Microsoft's version of COFF (since i rarely use the MS compiler), your last statement held little meaning to me.OMF was the only one used on the PC by probably 50 compilers for about 12 years. It's a pretty well worn standard. The only compilers I know of that supports Microsoft's version of COFF is Microsoft's compilers.The object file format used by D and the linker is OMF (Object Module Format). It's a standard put out by Intel.and the only other two linkers that seem to support it are Intel's and Borland's. i don't have access to Intel's. i never ceases to amaze me when some standards are never used by everyone.true, but i was hoping to avoid that. although i would like to write everything in D, my projects simply aren't ready for that, so i want to write certain modules in D. therefore, i want to use GCC for the majority of the project - and the object formats it supports. -- Charles "grey wolf" Banassince i work on multiple platforms, i need the ability to work with more common object file formats (like elf and coff) and to output a raw 32- bit binary file (with no header, relocation, or segment data) for my project. i guess i'll have to wait for the GCC frontend before i can use D. suck.The PE format is pretty simple, and it shouldn't be too hard to write an EXE2BIN for it, assuming that you've programmed out any references to DLLs, etc.
Mar 22 2003
...use GCC for the majority of the project - and the object formats it supports. Charles "grey wolf" BanasI second the motion. Object formats are a problem with Digital Mars tools generally and the whole topic also folds into a Linux port of DMC++ which would be an absolute Godsend for Linux. Mark
Mar 22 2003