home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!das-news.harvard.edu!cantaloupe.srv.cs.cmu.edu!netnews-2.srv.cs.cmu.edu!moss
- From: moss@cs.cmu.edu (Eliot Moss)
- Newsgroups: comp.unix.wizards
- Subject: Re: What is text, data & bss anyway?
- Message-ID: <MOSS.92Dec16110746@CRAFTY.cs.cmu.edu>
- Date: 16 Dec 92 16:07:46 GMT
- Article-I.D.: CRAFTY.MOSS.92Dec16110746
- References: <1992Dec14.234221.6644@saifr00.cfsat.honeywell.com>
- <1992Dec15.085938.5975@ericsson.se> <15907@auspex-gw.auspex.com>
- Sender: news@cs.cmu.edu (Usenet News System)
- Reply-To: moss@cs.cmu.edu
- Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
- Lines: 21
- In-Reply-To: guy@Auspex.COM's message of 15 Dec 92 19:34:30 GMT
- Nntp-Posting-Host: crafty.fox.cs.cmu.edu
-
- >>>>> On 15 Dec 92 19:34:30 GMT, guy@Auspex.COM (Guy Harris) said:
-
- Guy> What does GCC do with
-
- Guy> const char foo[] = "abcd";
-
- Guy> I.e., does it put it in the text or data segments? (Text segment, I
- Guy> hope.)
-
- It puts it in the text segment by default. However, you can tell gcc to put
- strings into the data segment (some programs actually expect to be able to
- modify strings!) with the flag -fwritable-strings.
- --
-
- J. Eliot B. Moss, Associate Professor Visiting Associate Professor
- Department of Computer Science School of Computer Science
- Lederle Graduate Research Center Carnegie Mellon University
- University of Massachusetts 5000 Forbes Avenue
- Amherst, MA 01003 Pittsburgh, PA 15213-3891
- (413) 545-4206, 545-1249 (fax) (412) 268-6767, 681-5739 (fax)
- Moss@cs.umass.edu Moss@cs.cmu.edu
-