httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject RE: another naming question
Date Mon, 29 Dec 1997 18:55:08 GMT

On Mon, 29 Dec 1997, David D'Antonio wrote:

> The last is /ORDER which takes a filename specifying the order of COMDATs
> (functions ?) to be put into the image. But you have to compile your modules
> with /Gy to get COMDATs. This also "enables function level linking."

I could be a bit off here -- it's been four years since I last manipulated
dos/win/os2 object files. 

COMDATs are just a section type in the obj files.  They actually behave
like fortran common declarations... but microsoft C generates all "extern
int blah;" references in COMDATs, and the linker will ensure that a
definition happens implicitly (which always annoys me, I prefer to have an
explicit definition). 

I think the reason for stuffing functions into them is one method of
dealing with functions that are declared multiple times... usually in C++.

dos/win compiler/linkers also usually have a feature whereby you can stuff
a bunch of library routines in one file (i.e. strcpy, strcat, ...), the
compiler can emit each function in a separate section.  Then the linker
can selectively include only the sections that are actually referenced. 
This is probably what they mean by "function level linking".  Normally
libraries are built with one function per file, and linking occurs on a
file level.


View raw message