Mail Archives: cygwin-developers/1998/10/02/12:34:07
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 -