Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!elroy!spl1!laidbak!daveb From: daveb@laidbak.UUCP (Dave Burton) Newsgroups: comp.lang.c Subject: Re: putting stuff in the text segment Message-ID: <1457@laidbak.UUCP> Date: 26 May 88 13:46:53 GMT References: <3813@lynx.UUCP> Reply-To: daveb@laidbak.UUCP (Dave Burton) Distribution: na Organization: is pretty bad/My method of Lines: 13 In article <3813@lynx.UUCP> m5@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.)