Re: Use of static ?
- From: mwojcik@xxxxxxxxxxx (Michael Wojcik)
- Date: 17 Oct 2005 15:51:00 GMT
In article <vsGdnQAhbcOm5M_enZ2dnUVZ_tGdnZ2d@xxxxxxxxxxx>, Joe Wright <jwright@xxxxxxxxxxx> writes:
>
> You misunderstand. The modules are compiled separately and then linked
> together into an executable. There is no passing of pointers among
> modules. Once linked, it's all one program. There are no modules anymore.
This is true of some implementations, but not all. In EPM C on the
AS/400, for example, each translation unit becomes a separate "*PGM
object", which exists as the equivalent of a separate file in the
filesystem; and at runtime, when one *PGM object refers to a symbol
with external linkage in another *PGM object, that object is loaded
and dynamically bound to the running job (if it hasn't already been).
There's a link step, but it only serves to associate *PGM object
names with the external-linakge symbols they define.
In short, in this implementation, there are modules after program
creation. C does not require that a linker create a single "program"
entity which removes module boundaries.
--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx
Art is our chief means of breaking bread with the dead ... but the social
and political history of Europe would be exactly the same if Dante and
Shakespeare and Mozart had never lived. -- W. H. Auden
.
- References:
- Use of static ?
- From: codefixer
- Re: Use of static ?
- From: peetm
- Re: Use of static ?
- From: Joe Wright
- Re: Use of static ?
- From: Simon Biber
- Use of static ?
- Prev by Date: Re: Help. Where is my error?
- Next by Date: Re: C source cruncher wanted
- Previous by thread: Re: Use of static ?
- Next by thread: Re: Use of static ?
- Index(es):