putting stuff in the text segment
Dave Burton
daveb at laidbak.UUCP
Thu May 26 23:46:53 AEST 1988
In article <3813 at lynx.UUCP> m5 at lynx.UUCP (Mike McNally) writes:
|Does a widely-accepted syntax extension to put data structures in the
|text segment exist? We are thinking about adding something like this
|to our compiler in order to reduce memory use by oft-forked large
|applications. I had in mind a couple of new storage classes, maybe
|"rom" and "staticrom".
I dunno of any language extensions, per se, to accomplish this.
The most widely used method to do this is to cc -S, sed 's/data/text/', as.
Sun (OS3.2) has embellished cc with a -R flag that accomplishes the same
thing with a whole lot less trouble.
I believe that using the -R approach is superior to changing the language.
(It is certainly more portable.)
More information about the Comp.lang.c
mailing list