home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / wizards / 5253 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.5 KB

  1. 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
  2. From: moss@cs.cmu.edu (Eliot Moss)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Re: What is text, data & bss anyway?
  5. Message-ID: <MOSS.92Dec16110746@CRAFTY.cs.cmu.edu>
  6. Date: 16 Dec 92 16:07:46 GMT
  7. Article-I.D.: CRAFTY.MOSS.92Dec16110746
  8. References: <1992Dec14.234221.6644@saifr00.cfsat.honeywell.com>
  9.     <1992Dec15.085938.5975@ericsson.se> <15907@auspex-gw.auspex.com>
  10. Sender: news@cs.cmu.edu (Usenet News System)
  11. Reply-To: moss@cs.cmu.edu
  12. Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
  13. Lines: 21
  14. In-Reply-To: guy@Auspex.COM's message of 15 Dec 92 19:34:30 GMT
  15. Nntp-Posting-Host: crafty.fox.cs.cmu.edu
  16.  
  17. >>>>> On 15 Dec 92 19:34:30 GMT, guy@Auspex.COM (Guy Harris) said:
  18.  
  19. Guy> What does GCC do with
  20.  
  21. Guy>     const char foo[] = "abcd";
  22.  
  23. Guy> I.e., does it put it in the text or data segments?  (Text segment, I
  24. Guy> hope.)
  25.  
  26. It puts it in the text segment by default. However, you can tell gcc to put
  27. strings into the data segment (some programs actually expect to be able to
  28. modify strings!) with the flag -fwritable-strings.
  29. --
  30.  
  31. J. Eliot B. Moss, Associate Professor    Visiting Associate Professor
  32. Department of Computer Science        School of Computer Science
  33. Lederle Graduate Research Center    Carnegie Mellon University
  34. University of Massachusetts        5000 Forbes Avenue
  35. Amherst, MA  01003            Pittsburgh, PA  15213-3891
  36. (413) 545-4206, 545-1249 (fax)        (412) 268-6767, 681-5739 (fax)
  37. Moss@cs.umass.edu            Moss@cs.cmu.edu
  38.