|MS-COFF Object Files firstname.lastname@example.org (1996-11-10)|
|Re: MS-COFF Object Files email@example.com (Michael Meissner) (1996-11-12)|
|Re: MS-COFF Object Files firstname.lastname@example.org (1996-11-12)|
|Re: MS-COFF Object Files email@example.com (1996-11-12)|
|Re: MS-COFF Object Files firstname.lastname@example.org (1996-11-14)|
|Re: MS-COFF Object Files email@example.com (1996-11-19)|
|From:||firstname.lastname@example.org (Henry S. Takeuchi)|
|Date:||12 Nov 1996 22:05:33 -0500|
Hugo <email@example.com> wrote:
>Its all very well writing a codegen generator, that creates block of
>machine code, but what about the messy details of differing object
>Is there such a thing as an 'OBJ format' independent codegen ?
>When you think about it, the obj format is nothing to do with code
>generation, I wonder if anyone has any views or info on this aspect
>of compilers ?
The following is a simplified list of my OMF generating routines:
output absolute code (segment, data)
output relocatable code (segment, target segment, displacement part)
output relocatable code (segment, external reference, displacement part)
These routines are suitable for a sequential format such as OMF. My
intention was to also use these for generating MS-COFF files. (Won't
be done in the near future because the VC++ linker can handle OMF, and
other parts of my compiler have higher priority.)
The output routines know nothing about CPU instructions, only about
what kinds of relocatable data are possible.
A separate pass is used to define internal labels and external symbols,
collect names, determine segment sizes, etc.
The output routines increment the location counters and takes care of
all the messy file details like record overflow, checksums, etc.
If symbol tables need to appear at the beginning of the file, the output
header routine takes care of this.
Henry S. Takeuchi
Seattle, Washington (USA)
Return to the
Search the comp.compilers archives again.