putting stuff in the text segment
der Mouse
mouse at mcgill-vision.UUCP
Sun Jun 12 20:22:51 AEST 1988
In article <1457 at laidbak.UUCP>, daveb at laidbak.UUCP (Dave Burton) writes:
> 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?
> I dunno of any language extensions, per se, to accomplish this. [...]
> Sun (OS3.2) has embellished cc with a -R flag that accomplishes the
> same thing with a whole lot less trouble.
This is not Sun's innovation. The -R flag exists in 4.3 and I believe
it existed in 4.2 as well.
> I believe that using the -R approach is superior to changing the
> language. (It is certainly more portable.)
It is definitely more portable. However, it has one disadvantage: it
applies to the entire file. You can't have a mostly-normal file with
three strings going in the text segment, for example.
On the whole, I think changing the language is better *if* everyone
adopts the same way of doing so. (This appears to be the intent of the
ANSI "const" keyword.)
der Mouse
uucp: mouse at mcgill-vision.uucp
arpa: mouse at larry.mcrcim.mcgill.edu
More information about the Comp.lang.c
mailing list