www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/10/02/12:34:07

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: Re: egcs-1.1b
2 Oct 1998 12:34:07 -0700 :
Message-ID: <19981002151430.A16550.cygnus.cygwin32.developers@cygnus.com>
References: <19981002085228 DOT B12119 AT cygnus DOT com>
Mime-Version: 1.0
To: Mumit Khan <khan AT xraylith DOT wisc DOT edu>
Cc: Corinna Vinschen <corinna DOT vinschen AT cityweb DOT de>,
cygwin32-developers AT cygnus DOT com

On Fri, Oct 02, 1998 at 01:35:35PM -0500, Mumit Khan wrote:
>Christopher Faylor <cgf AT cygnus DOT com> writes:
>> >Erasing `const' works, but I don't understand, what happens.
>> >Is it a bug or am I too dull or what?
>
>Corrina, When you say egcs-1.1b, does it mean that you built the compiler 
>yourself from egcs-1.1b source? If so, did you add any of the patches? 
>
>> Yow.  It sounds like constants are being put in their own section
>> now.  Since fork doesn't know about this section, it won't be
>> copied anyway so you can safely remove the NO_COPY attribute.
>
>The C++ front-end puts const data in .text section right now unless
>of course you supply an explicit section directive, as done in the
>example here. It will be copied on fork in the current scheme of course,
>and using NO_COPY will do the right thing if you don't want it copied 
>on fork.

The .text section won't be physically copied by fork since it is
read-only, isn't it?  it will be loaded by Windows from disk
automatically.  If const data is going in .text I don't see any reason
to also add NO_COPY.

-- 
cgf AT cygnus DOT com
http://www.cygnus.com/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019