From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20104 invoked by alias); 28 Nov 2006 02:57:41 -0000 Received: (qmail 20096 invoked by uid 22791); 28 Nov 2006 02:57:40 -0000 X-Spam-Check-By: sourceware.org Received: from shell4.BAYAREA.NET (HELO shell4.bayarea.net) (209.128.82.1) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Nov 2006 02:57:35 +0000 Received: from [192.168.20.7] (209-128-106-254.bayarea.net [209.128.106.254]) (authenticated bits=0) by shell4.bayarea.net (8.13.6/8.13.6) with ESMTP id kAS2vWZR011691; Mon, 27 Nov 2006 18:57:32 -0800 Message-ID: <456BA59B.8030504@eagercon.com> Date: Tue, 28 Nov 2006 02:57:00 -0000 From: Michael Eager User-Agent: Thunderbird 1.5.0.7 (X11/20060913) MIME-Version: 1.0 To: kanishk rastogi CC: gcc-help@gcc.gnu.org Subject: Re: Problem with the string References: <9ee2fe770611240126t47803b82gc733ae0e7d61b746@mail.gmail.com> In-Reply-To: <9ee2fe770611240126t47803b82gc733ae0e7d61b746@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2006-11/txt/msg00325.txt.bz2 kanishk rastogi wrote: > hi all, > when we compile our c programs the strings which we use get defined in > read only memory. > how can i ask the gcc compiler to declare them in read-write section. > or in other words > how can i as the compiler to perform the same operation as performed > by it when we use --fno-const-strings while compiling c++ prog One alternative which may or may not meet your needs: you can modify the linker script to put all data in R/W memory. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077