From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 8 Mar 2004 17:40:43 -0500 From: William Josephson To: 9fans@cse.psu.edu Subject: Re: [9fans] constant string Message-ID: <20040308224043.GA84717@mero.morphisms.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i Topicbox-Message-UUID: 249125f4-eacd-11e9-9e20-41e7f4b1d025 On Mon, Mar 08, 2004 at 10:15:07AM +0000, Prem Mallappa wrote: > my question is when i compile this in Linux (gcc) i get a segmentation > > but when i compile the same thing in plan9 C compiler ( both native "8c" > and "pcc" i get a output of "Hezlo") Try compiling with gcc -fwritable-strings on Linux and see what happens. By default gcc puts initialized data in a read-only segment but pcc does not.